cookbook icon indicating copy to clipboard operation
cookbook copied to clipboard

Updated Tag_and_caption_images.ipynb to use google-genai

Open Shi-pra-19 opened this issue 8 months ago • 6 comments

Updated module google-generativeai to use google-genai Refactored imports Modified how configs are being assigned to models

Shi-pra-19 avatar Apr 04 '25 02:04 Shi-pra-19

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

View / edit / reply to this conversation on ReviewNB

andycandy commented on 2025-04-04T16:31:46Z ----------------------------------------------------------------

Try moving imports to the cells where they are first being used in


View / edit / reply to this conversation on ReviewNB

andycandy commented on 2025-04-04T16:31:47Z ----------------------------------------------------------------

Break the text lines into smaller parts for readability (reference: try keeping your text behind white vertical line that you see in colab)


View / edit / reply to this conversation on ReviewNB

andycandy commented on 2025-04-04T16:31:48Z ----------------------------------------------------------------

Line #3.         Your job is to extract information from a photo that will help describe an item.

Same nitpick as above, try reducing single line lengths


View / edit / reply to this conversation on ReviewNB

Giom-V commented on 2025-04-07T12:25:56Z ----------------------------------------------------------------

Line #3.            model="embedding-001",

Can you add an embedding model selector, like EMBEDDINGS_'ODEL_ID = "embedding-001" # @param ["embedding-001", "text-embedding-004","gemini-embedding-exp-03-07"] {"allow-input":true, isTemplate: true}


Thanks for the submission @Shi-pra-19 !

Apart from what @andycandy already pointed out, I only had a recommendation about the embedding model.

You can ignore the lint issue, but please run the formatting script before submitting (cf. https://github.com/google-gemini/cookbook/actions/runs/14273883632/job/40099691565?pr=653)

Giom-V avatar Apr 07 '25 12:04 Giom-V

Thanks @Shi-pra-19 for the submission. It's now accepted and merged!

Giom-V avatar Apr 22 '25 14:04 Giom-V