Aratako commited on
Commit
2f75282
·
verified ·
1 Parent(s): c82eea7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -99,9 +99,9 @@ def chat_llama3_8b(message: str,
99
  for text in streamer:
100
  # Remove thinking tags to prevent Gradio display issues
101
  if "<think>" in text:
102
- text = text.replace("[think]", "").strip()
103
  if "</think>" in text:
104
- text = text.replace("[/think]", "").strip()
105
  outputs.append(text)
106
  print("".join(outputs))
107
  yield "".join(outputs)
 
99
  for text in streamer:
100
  # Remove thinking tags to prevent Gradio display issues
101
  if "<think>" in text:
102
+ text = text.replace("<think>", "[think]").strip()
103
  if "</think>" in text:
104
+ text = text.replace("</think>", "[/think]").strip()
105
  outputs.append(text)
106
  print("".join(outputs))
107
  yield "".join(outputs)