feat(ai-logic): add hybrid on-device inference sample#2773
feat(ai-logic): add hybrid on-device inference sample#2773thatfiredev wants to merge 8 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a Hybrid Receipt Scanner feature that utilizes Firebase AI to extract expense data from receipts, preferring on-device inference. The changes include the addition of a new ViewModel for managing model downloads and scanning logic, a Compose-based UI for displaying expenses, and necessary dependency updates. Review feedback highlights the need to handle exceptions in the image picker rather than leaving the catch block empty, improving the robustness of the CSV parsing logic to handle store names containing commas, and removing an unnecessary non-null assertion where Kotlin smart-casting is already available.
firebase-ai/app/src/main/java/com/google/firebase/quickstart/ai/ui/HybridInferenceScreen.kt
Outdated
Show resolved
Hide resolved
...p/src/main/java/com/google/firebase/quickstart/ai/feature/hybrid/HybridInferenceViewModel.kt
Outdated
Show resolved
Hide resolved
firebase-ai/app/src/main/java/com/google/firebase/quickstart/ai/ui/HybridInferenceScreen.kt
Show resolved
Hide resolved
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a Hybrid Receipt Scanner feature that utilizes Firebase AI's hybrid inference to extract expense data from receipts, prioritizing on-device processing. The implementation includes a new ViewModel for model management and receipt parsing, a dedicated UI screen, and necessary dependency updates. Feedback focuses on enhancing error handling for parsing failures and image loading issues, as well as improving localization by using standard currency formatting instead of hardcoded symbols.
Note that this also: