Spaces:
Running
Running
Uploading FoodExtract demo app.py
Browse files- README.md +30 -6
- requirements.txt +9 -0
README.md
CHANGED
|
@@ -1,12 +1,36 @@
|
|
| 1 |
---
|
| 2 |
-
title: FoodExtract
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 6.10.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: FoodExtract Fine-tuned LLM Structued Data Extractor
|
| 3 |
+
emoji: 📝➡️🍟
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: gradio
|
|
|
|
| 7 |
app_file: app.py
|
| 8 |
pinned: false
|
| 9 |
+
license: apache-2.0
|
| 10 |
---
|
| 11 |
|
| 12 |
+
"""
|
| 13 |
+
Fine-tuned Gemma 3 270M to extract food and drink items from raw text.
|
| 14 |
+
|
| 15 |
+
Input can be any form of real text and output will be a formatted string such as the following:
|
| 16 |
+
|
| 17 |
+
```
|
| 18 |
+
food_or_drink: 1
|
| 19 |
+
tags: fi, re
|
| 20 |
+
foods: tacos, milk, red apple, pineapple, cherries, fried chicken, steak, mayonnaise
|
| 21 |
+
drinks: iced latte, matcha latte
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
The tags map to the following items:
|
| 25 |
+
|
| 26 |
+
```
|
| 27 |
+
tags_dict = {'np': 'nutrition_panel',
|
| 28 |
+
'il': 'ingredient list',
|
| 29 |
+
'me': 'menu',
|
| 30 |
+
're': 'recipe',
|
| 31 |
+
'fi': 'food_items',
|
| 32 |
+
'di': 'drink_items',
|
| 33 |
+
'fa': 'food_advertistment',
|
| 34 |
+
'fp': 'food_packaging'}
|
| 35 |
+
```
|
| 36 |
+
"""
|
requirements.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
transformers
|
| 2 |
+
gradio
|
| 3 |
+
torch
|
| 4 |
+
accelerate
|
| 5 |
+
|
| 6 |
+
```
|
| 7 |
+
# This is formatted as code
|
| 8 |
+
```
|
| 9 |
+
|