Closed Daethyra closed 11 months ago
Modules like json and dotenv are imported but not used. Consider removing them if they are not necessary.
The usage of config['ENDING_CAPTION'] in the main function seems incorrect. You might need to use ending_caption instead, as it is the variable holding the relevant environment variable value.
In save_to_csv, you open csvfile as a new file every time. If csvfile is passed as an argument, it should be used instead of opening a new file. Also, consider parameterizing the write mode ('a' for appending) to allow for more flexibility.
While you have a try-except block, it might be useful to continue processing other images even if one fails. Consider moving the try-except inside the loop to handle errors on a per-image basis.
redundant issue
List: