The Visual-Nutrition-Assistant is a Health Management App that empowers users to make informed dietary choices. By analyzing images of meals using the Google Gemini Pro Vision API, the app provides detailed nutritional information, including total calorie counts for each food item.
- Create a Conda Environment
conda create -p venv python==3.10 -y
- Activate the Environment
conda activate venv/
- Install Required Packages
pip install -r requirements.txt
- Deactivate the Environment
conda deactivate
The required packages are specified in the requirements.txt
file. Key dependencies include:
dotenv
os
pillow
google-generativeai
streamlit
- Google Gemini Pro Vision API
- API Key:
GOOGLE_API_KEY
- API Key:
- Run the Streamlit app:
streamlit run app.py
- Provide an optional text prompt.
- Upload an image of your meal.
- Click the "Tell me the total calories" button.
- View the detailed nutritional breakdown and total calorie count.
The project uses Conda to manage the virtual environment and ensure all dependencies are installed.
The Google Gemini Pro Vision API is configured to analyze meal images and generate nutritional data.
The app processes uploaded images into a format suitable for the API and extracts relevant features for analysis.
A simple and intuitive interface built with Streamlit enables users to upload images, enter prompts, and visualize results.
The app leverages advanced AI models to extract detailed insights, such as calorie counts and nutritional values for each food item.
-
Data Input
- Users upload meal images and optionally provide a text prompt for guided analysis.
-
Image Processing
- Images are preprocessed for compatibility with the API.
-
Content Generation
- Processed inputs are sent to the Google Gemini Pro Vision API for detailed analysis.
-
Nutritional Calculation
- The API response includes food item recognition and calorie/nutritional values.
-
Output Display
- Results are displayed in an organized and user-friendly format.
-
Expanded Food Database
- Enhance the app's accuracy by integrating comprehensive food databases.
-
Multi-Language Support
- Support multiple languages for a wider audience reach.
-
Improved AI Models
- Incorporate advanced AI models for better accuracy in food recognition and analysis.
-
Mobile Application
- Develop a mobile version for easier accessibility.
-
Dietary Recommendations
- Provide personalized dietary suggestions tailored to user preferences and goals.
-
User Data Integration
- Enable tracking of user nutritional data to offer insights into eating habits and progress.
The Visual Nutrition Assistant bridges the gap between advanced AI and practical health management. By leveraging the Google Gemini Pro Vision API and a seamless Streamlit interface, the app equips users with insights to make healthier dietary choices.
This documentation is concise, comprehensive, and user-friendly, ensuring that collaborators and users can easily understand and contribute to the project.
Happy Coding :)