Spaces:
Runtime error
Runtime error
| title: Food‑Recognition API | |
| emoji: 🍎 | |
| colorFrom: red | |
| colorTo: yellow | |
| sdk: docker | |
| sdk_version: "4" | |
| python_version: "3.11" | |
| app_file: app.py | |
| pinned: false | |
| # 🍎 Food‑Recognition API (Hugging Face Space) | |
| This Space runs a tiny **FastAPI** service that wraps the model | |
| `BinhQuocNguyen/food-recognition-model`. | |
| It: | |
| * loads the food‑recognition model once at start‑up | |
| * accepts an image (base‑64‑encoded) via **POST `/analyze`** | |
| * returns the top food label, a confidence score, an estimated portion weight (g) and the estimated calories for that portion. | |
| ## 🚀 How to call the API | |
| ```bash | |
| curl -X POST https://<your‑username>-my-food-api.hf.space/analyze \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"image":"<base64‑string>"}' | |