- 
                Notifications
    You must be signed in to change notification settings 
- Fork 213
Use Nano to generate image description #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Change-Id: Icede720e9b25ff53cb80835727d2a112d61c6334
| Summary of ChangesHello @calren, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the application's integration with Gemini Nano, migrating from an older AI Edge library to the latest ML Kit for GenAI library. This change streamlines the process of downloading and utilizing the Gemini Nano model for on-device image description and validation. The new implementation introduces remote configuration for managing Nano-specific prompts and model versions, and intelligently falls back to Firebase AI if Nano is unavailable or unsuccessful, ensuring robust image processing capabilities. Highlights
 Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either  
 Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a  Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request is a significant and well-executed refactoring to integrate Gemini Nano for image description generation, migrating from the older ai.edge library to the new genai.prompt library. The use of androidx.startup.Initializer for handling the model download at startup is a great improvement. The fallback logic to Firebase AI when Nano is unavailable or fails is robust. I've added a few suggestions to improve dependency management, prevent potential crashes, and optimize performance by reducing redundant operations. Overall, this is a solid contribution that modernizes the AI integration in the app.
No description provided.