CoolFace
Apppublic

piri080901/smartplate

sourceHugging Facemitupdated 4mo agoView on Hugging Face
0likes
App README

🍽️ SmartPlate — Personalized AI Meal Analyzer

SmartPlate turns a single meal photo into personalized, source-backed nutritional feedback by chaining three AI blocks into one pipeline.

Live demo: https://huggingface.co/spaces/piri080901/smartplate

Meal photo → [Computer Vision] dish → [USDA] nutrients
           → [ML] Nutri-Score → [NLP/RAG] personalized, cited explanation

The three blocks

BlockModelWhat it doesResult
Computer VisionViT-Base (fine-tuned on Food-101)Identifies the dish97.8% top-1
ML NumericXGBoost (Open Food Facts, 1.34M products)Predicts Nutri-Score A–E0.84 macro-F1
NLP / RAGGPT-4o-mini + ChromaDB (WHO / Harvard / EAT-Lancet)Writes personalized, source-cited advice94% citation rate

Plus a health-coach chat for follow-up questions ("How can I make this healthier?").

Quick start

bash
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env        # add OPENAI_API_KEY and USDA_API_KEY
python app.py               # open http://127.0.0.1:7860

Repository layout

app/                 Gradio app (inference) + example images
src/nlp/             RAG explainer (ChromaDB + GPT-4o-mini)
src/utils/           USDA FoodData Central API client
notebooks/           01 EDA-CV · 02 EDA-ML · 03 CV-train · 04 ML-train · 05 NLP-eval
data/raw/guidelines/ WHO / Harvard / EAT-Lancet (RAG knowledge base)
evaluation/          results + ethics & bias analysis
screenshots/         UI screenshots
documentation.md     full project documentation (start here)

Documentation

Full methodology, metrics, and evaluation are in `documentation.md`. Ethics & bias analysis in `evaluation/ethics_bias_analysis.md`.


ZHAW AI Applications — Final Project (Spring 2026). ⚠️ Educational use only — not medical advice.