haxerwddle commited on
Commit
886596e
·
1 Parent(s): 1048a5e

UI change

Browse files
Files changed (1) hide show
  1. app.py +12 -6
app.py CHANGED
@@ -32,15 +32,21 @@ chat_model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-large")
32
 
33
  def explain_recycling(class_label):
34
  prompt = f"""
35
- You are a waste management expert.
36
 
37
- The waste item is classified as: **{class_label}**.
38
- Provide instruction for the following:
39
 
40
- 1. How to recycle {class_label} correctly. (2 - 3 bullet points)
41
- 2. Optional tips for reducing {class_label} waste. (2 - 3 bullet points)
 
42
 
43
- REMEMBER: Break line after each point.
 
 
 
 
 
 
44
  """
45
 
46
  inputs = tokenizer(prompt, return_tensors="pt").input_ids
 
32
 
33
  def explain_recycling(class_label):
34
  prompt = f"""
35
+ You are an expert in waste management.
36
 
37
+ The item has been identified as: {class_label}
 
38
 
39
+ Your task:
40
+ 1. Give 2 to 3 clear bullet points explaining how to recycle this item correctly.
41
+ 2. Give 2 to 3 clear bullet points explaining how to reduce waste from this item.
42
 
43
+ Formatting rules:
44
+ - Use simple hyphen bullet points ("- ").
45
+ - Put each bullet point on a new line.
46
+ - Do NOT add introductions, explanations, or extra text.
47
+ - Output only the bullet points.
48
+
49
+ Now provide the bullet points for: {class_label}
50
  """
51
 
52
  inputs = tokenizer(prompt, return_tensors="pt").input_ids