Spaces:
Sleeping
Sleeping
Commit ·
7b6423d
1
Parent(s): 8415066
minor prompt change
Browse files
app.py
CHANGED
|
@@ -35,21 +35,17 @@ chat_model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-base")
|
|
| 35 |
|
| 36 |
def explain_recycling(class_label):
|
| 37 |
prompt = f"""
|
| 38 |
-
You are a waste management expert.
|
|
|
|
|
|
|
| 39 |
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
1. Recycling type
|
| 45 |
-
2. Why it belongs to this category
|
| 46 |
-
3. Correct disposal method
|
| 47 |
-
4. How it's recycled or processed
|
| 48 |
-
5. Environmental impact if handled incorrectly
|
| 49 |
-
6. Tips for reducing or reusing this item
|
| 50 |
-
|
| 51 |
-
Write 3–6 paragraphs, friendly and clear.
|
| 52 |
-
"""
|
| 53 |
|
| 54 |
inputs = tokenizer(prompt, return_tensors="pt").input_ids
|
| 55 |
|
|
|
|
| 35 |
|
| 36 |
def explain_recycling(class_label):
|
| 37 |
prompt = f"""
|
| 38 |
+
You are a waste management expert.
|
| 39 |
+
The waste item is classified as: {class_label}
|
| 40 |
+
Provide a detailed explanation including:
|
| 41 |
|
| 42 |
+
1. Recycling type
|
| 43 |
+
2. Correct disposal method
|
| 44 |
+
3. How it should be recycled or processed
|
| 45 |
+
4. Tips for reducing or reusing this item
|
| 46 |
|
| 47 |
+
Write 3–6 paragraphs, friendly and clear.
|
| 48 |
+
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
inputs = tokenizer(prompt, return_tensors="pt").input_ids
|
| 51 |
|