Smart Bhojan is a Streamlit-based web application designed to help users understand the nutritional profile of Indian dishes. It calculates a custom health score, visualizes macronutrients, and provides downloadable PDF recipe reports.
- Search: Use the sidebar to search for your favorite Indian dish.
- Analyze: Check the Health Score and the macronutrient breakdown chart.
- Customize: Adjust the "Target kcal" slider to see how the meal fits your goals.
- Download: Click the "Download PDF Report" button to save the recipe and nutrition facts offline.
Check out the live app here: Smart Bhojan Web App
- Health Scoring Engine: Uses a custom algorithm to rate food from 0-10 (Super Food to Indulgent).
- Nutritional Visualization: Horizontal bar charts showing Protein, Carbs, and Fat content.
- Dynamic Search: Filter through dishes using the sidebar search and selection tools.
- PDF Report Generator: Export recipes and nutritional facts into a professionally formatted PDF with custom borders.
- Responsive UI: Custom CSS "Green Frame" design for a clean, modern aesthetic.
- Frontend: Streamlit
- Data Handling: Pandas
- Visualization: Matplotlib
- PDF Generation: ReportLab
- Styling: Custom CSS & HTML Injection
βββ app.py # Main Streamlit application code
βββ enriched_food_metadata_english.csv # Food dataset (Names, Macros, Instructions)
βββ images/ # Folder containing food images (e.g., Panner_Tikka.jpg)
βββ README.md # Project documentation
-
Clone the repository:
git clone https://github.com cd smart-bhojan -
Install dependencies:
pip install streamlit pandas matplotlib reportlab
-
Prepare your Data:
- Ensure your
enriched_food_metadata_english.csvincludes columns:food_name,Protein (g),Carbs (g),Fat (g),Calories (kcal), andInstructions. - Place images in the
images/folder with names matching thefood_name(e.g.,samosa.jpg).
- Ensure your
-
Run the App Locally:
streamlit run app.py
The health score is calculated based on a weighted formula:
Score = 6.0 + [(Protein * 2.5) - (Fat * 1.5) - (Calories / 100)] / 5
This rewards high protein content while penalizing excessive fats and empty calories.