AdeogunTechno commited on
Commit
7727242
·
verified ·
1 Parent(s): ec7689e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +29 -1
README.md CHANGED
@@ -1 +1,29 @@
1
- markdown <br>---<br>sdk: docker<br>app_port: 7860<br>---<br># Food‑Recognition API <br>This Space runs a tiny FastAPI service that: <br>* loads **BinhQuocNguyen/food‑recognition‑model** <br>* accepts a base‑64‑encoded image via **POST /analyze** <br>* returns the top food label, a (hard‑coded) portion‑size estimate and an estimated calorie count. <br>Example request (curl): <br>bash<br>curl -X POST https://<your‑username>-my-food-api.hf.space/analyze <br> -H "Content-Type: application/json" <br> -d '{"image":"<base64‑string>"}'<br><br> ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Food‑Recognition API
3
+ emoji: 🍎
4
+ colorFrom: red
5
+ colorTo: yellow
6
+ sdk: docker
7
+ sdk_version: "4"
8
+ python_version: "3.11"
9
+ app_file: app.py
10
+ pinned: false
11
+ ---
12
+
13
+ # 🍎 Food‑Recognition API (Hugging Face Space)
14
+
15
+ This Space runs a tiny **FastAPI** service that wraps the model
16
+ `BinhQuocNguyen/food-recognition-model`.
17
+
18
+ It:
19
+
20
+ * loads the food‑recognition model once at start‑up
21
+ * accepts an image (base‑64‑encoded) via **POST `/analyze`**
22
+ * returns the top food label, a confidence score, an estimated portion weight (g) and the estimated calories for that portion.
23
+
24
+ ## 🚀 How to call the API
25
+
26
+ ```bash
27
+ curl -X POST https://<your‑username>-my-food-api.hf.space/analyze \
28
+ -H "Content-Type: application/json" \
29
+ -d '{"image":"<base64‑string>"}'