NutriLens is an intelligent nutrition analysis application that leverages Google's Gemini API to provide instant, detailed nutritional insights from your meal images. Simply upload a picture of your food, and get a comprehensive breakdown of calories, food items, and nutritional information.
- 📸 Image-based Nutrition Analysis
- 🔢 Calorie Counting
- 📋 Detailed Food Item Breakdown
- 💡 Nutritional Insights
- 🌈 Modern, User-Friendly Interface
- Python
- Streamlit
- Google Generative AI (Gemini)
- PIL (Python Imaging Library)
- Python 3.8+
- Google Cloud Account
- Gemini API Key
- Clone the repository
git clone https://github.com/yourusername/nutrilens.git
cd nutrilens- Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`- Install dependencies
pip install -r requirements.txt- Set up environment variables
Create a
.envfile in the project root and add:
GOOGLE_API_KEY=your_google_api_key_here
streamlit run app.py- Modify
input_promptin the code to customize nutritional analysis - Adjust CSS in
local_css()function to change UI styling
Create a requirements.txt with:
streamlit
google-generativeai
python-dotenv
Pillow
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Never commit your
.envfile or API keys to version control - Use environment variables for sensitive information
- Upload a meal image
- (Optional) Add context about your dietary goals
- Click "Analyze Meal Nutrition"
- Receive instant nutritional breakdown
- Multiple language support
- Dietary goal tracking
- Export nutrition reports
- Recipe suggestions based on nutrition
Current Version: 1.0.0
Distributed under the MIT License. See LICENSE for more information.
Your Name - vivekyad5223@gmail.com
Project Link: https://github.com/taskmaster-1/nutrilens
Disclaimer: NutriLens provides estimated nutritional information. Always consult a professional nutritionist for precise dietary advice.