Spaces:
Running
Running
Uploading FoodExtract demo app.py
Browse files
app.py
CHANGED
|
@@ -42,8 +42,6 @@ tokenizer = AutoTokenizer.from_pretrained(
|
|
| 42 |
# device_map="auto",
|
| 43 |
# attn_implementation="eager"
|
| 44 |
# )
|
| 45 |
-
#
|
| 46 |
-
# # Create model pipeline
|
| 47 |
# loaded_model_pipeline = pipeline("text-generation",
|
| 48 |
# model=loaded_model,
|
| 49 |
# tokenizer=tokenizer)
|
|
@@ -59,12 +57,12 @@ loaded_model_pipeline = pipeline(
|
|
| 59 |
|
| 60 |
|
| 61 |
# Create the demo
|
| 62 |
-
description = """
|
|
|
|
|
|
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
* Input (str): Raw text strings or image captions (e.g. "A photo of a dog sitting on a beach" or "A breakfast plate with bacon, eggs and toast")
|
| 67 |
-
* Output (str): Generated text with food/not_food classification as well as noun extracted food and drink items and various food tags.
|
| 68 |
|
| 69 |
For example:
|
| 70 |
|
|
@@ -87,7 +85,7 @@ demo = gr.Interface(fn=pred_on_text,
|
|
| 87 |
title="π³ Structured FoodExtract with a Fine-Tuned Gemma 3 270M",
|
| 88 |
description=description,
|
| 89 |
examples=[["Hello world! This is my first fine-tuned LLM!"],
|
| 90 |
-
["
|
| 91 |
["British Breakfast with baked beans, fried eggs, black pudding, sausages, bacon, mushrooms, a cup of tea and toast and fried tomatoes"],
|
| 92 |
["Steak tacos"],
|
| 93 |
["A photo of a dog sitting on a beach"]]
|
|
|
|
| 42 |
# device_map="auto",
|
| 43 |
# attn_implementation="eager"
|
| 44 |
# )
|
|
|
|
|
|
|
| 45 |
# loaded_model_pipeline = pipeline("text-generation",
|
| 46 |
# model=loaded_model,
|
| 47 |
# tokenizer=tokenizer)
|
|
|
|
| 57 |
|
| 58 |
|
| 59 |
# Create the demo
|
| 60 |
+
description = """ν
μ€νΈμμ μμκ³Ό μλ£ νλͺ©μ μΆμΆνλ νμΈνλλ SLM(Small Language Model)
|
| 61 |
+
- basemodel: [Gemma 3 270M](https://huggingface.co/google/gemma-3-270m-it)
|
| 62 |
+
- dataset: [FoodExtract-1k λ°μ΄ν°μ
](https://huggingface.co/datasets/objects76/FoodExtract-1k)
|
| 63 |
|
| 64 |
+
* μ
λ ₯ (str): μμ ν
μ€νΈ λ¬Έμμ΄ λλ μ΄λ―Έμ§ μΊ‘μ
(μ: "νν΄ μμ μλ κ°μ μ¬μ§" λλ "λ² μ΄μ»¨, κ³λ, ν μ€νΈκ° μλ μμΉ¨ μμ¬")
|
| 65 |
+
* μΆλ ₯ (str): μμ/λΉμμ λΆλ₯μ μΆμΆλ λͺ
μ¬ν μμ λ° μλ£ νλͺ©, λ€μν μμ νκ·Έκ° ν¬ν¨λ μμ± ν
μ€νΈ
|
|
|
|
|
|
|
| 66 |
|
| 67 |
For example:
|
| 68 |
|
|
|
|
| 85 |
title="π³ Structured FoodExtract with a Fine-Tuned Gemma 3 270M",
|
| 86 |
description=description,
|
| 87 |
examples=[["Hello world! This is my first fine-tuned LLM!"],
|
| 88 |
+
["그릴μ κ΅¬μ΄ λ°λΌλ¬Έλμ μ보카λ, μ¬λ¦¬λΈ, ν λ§ν , μ΄ν리μ λλ μ±μ΄ κ³λ€μ¬μ§ μλ¬λκ° μλ ν μ μ μμ"],
|
| 89 |
["British Breakfast with baked beans, fried eggs, black pudding, sausages, bacon, mushrooms, a cup of tea and toast and fried tomatoes"],
|
| 90 |
["Steak tacos"],
|
| 91 |
["A photo of a dog sitting on a beach"]]
|