Update package to google-genai in `examples/Classify_text_with_embeddings.ipynb`
Update package to google-genai in examples/Classify_text_with_embeddings.ipynb
- Updated
google-generativeaito usegoogle-genaipackage instead. - Updated outputs and tested locally.
- Refactored imports
- Process 100 rows in 1 batch request for getting embeddings. (100 is the max limit
BatchEmbedContentsRequest.requests: at most 100 requests can be in one batch) .The original issue didn't require this optimization, but it was needed since free gemini API credits are insufficient for 600 requests. Now, it can be done in 6 requests. - Replaced
SigmoidwithSoftmaxfor multi-class classification and setfrom_logits=False - Formatted with nbfmt and nblint tool
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Thanks for the submission @Jenniebn! The code is good and well formatted.
I just added a few comments so that we improve the explanations while we're at it.
Thanks for the submission @Jenniebn! The code is good and well formatted.
I just added a few comments so that we improve the explanations while we're at it.
Thank you for your review. I just implemented everything you commented! Feel free to let me know if there is anything else that needs to be updated!
Thanks for the submission @Jenniebn. It's approved and merged!