Daethyra / Build-RAGAI

Interactive notes (Jupyter Notebooks) for building AI-powered applications
Other
27 stars 3 forks source link

Correct logical errors in all LLM-Utilikit modules #56

Closed Daethyra closed 11 months ago

Daethyra commented 11 months ago

List:

Daethyra commented 11 months ago

Leftover work: integrable_image_captioner.py:

Code Improvements:

Unused Imports:

Modules like json and dotenv are imported but not used. Consider removing them if they are not necessary.

Global Variable Usage:

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.

CSV File Handling:

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.

Error Handling in Main:

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.

Daethyra commented 11 months ago

redundant issue