haxerwddle commited on
Commit
853dc5c
·
1 Parent(s): 9aa948f

Model prompt change

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -55,7 +55,7 @@ def explain_recycling(class_label):
55
  "role": "system",
56
  "content": (
57
  "You are an expert in waste sorting. "
58
- "You ALWAYS answer using exactly two bullet points:\n"
59
  "• Recycling type: <Item>\n"
60
  "• Disposal Method: <clear, creative solution>\n"
61
  "• Tip to reduce item waste: <clear, detailed correct sentence>\n"
@@ -77,9 +77,12 @@ def explain_recycling(class_label):
77
  outputs = pipe(
78
  prompt,
79
  max_new_tokens=60,
80
- do_sample=False
 
 
81
  )
82
 
 
83
  raw = outputs[0]["generated_text"]
84
  return clean_chat_output(raw)
85
 
 
55
  "role": "system",
56
  "content": (
57
  "You are an expert in waste sorting. "
58
+ "You ALWAYS answer using exactly 3 bullet points:\n"
59
  "• Recycling type: <Item>\n"
60
  "• Disposal Method: <clear, creative solution>\n"
61
  "• Tip to reduce item waste: <clear, detailed correct sentence>\n"
 
77
  outputs = pipe(
78
  prompt,
79
  max_new_tokens=60,
80
+ do_sample=True,
81
+ temperature=0.3,
82
+ top_p=0.9
83
  )
84
 
85
+
86
  raw = outputs[0]["generated_text"]
87
  return clean_chat_output(raw)
88