Spaces:
Sleeping
Sleeping
Commit ·
45441c5
1
Parent(s): 80545ae
prompt model change
Browse files
app.py
CHANGED
|
@@ -40,18 +40,13 @@ chat_model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-base")
|
|
| 40 |
|
| 41 |
def explain_recycling(class_label):
|
| 42 |
prompt = f"""
|
| 43 |
-
|
| 44 |
-
|
| 45 |
Provide the answer including:
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
• Tip
|
| 51 |
-
|
| 52 |
-
Use real line breaks. Keep each answer short.
|
| 53 |
"""
|
| 54 |
-
|
| 55 |
inputs = tokenizer(prompt, return_tensors="pt").input_ids
|
| 56 |
|
| 57 |
outputs = chat_model.generate(
|
|
|
|
| 40 |
|
| 41 |
def explain_recycling(class_label):
|
| 42 |
prompt = f"""
|
| 43 |
+
waste item: {class_label}.
|
|
|
|
| 44 |
Provide the answer including:
|
| 45 |
|
| 46 |
+
- trash type
|
| 47 |
+
- recycling method
|
| 48 |
+
- tip
|
|
|
|
|
|
|
|
|
|
| 49 |
"""
|
|
|
|
| 50 |
inputs = tokenizer(prompt, return_tensors="pt").input_ids
|
| 51 |
|
| 52 |
outputs = chat_model.generate(
|