vilarin commited on
Commit
e9f4550
1 Parent(s): 8cca029

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -71,10 +71,10 @@ def stream_chat(message, history: list, temperature: float, max_new_tokens: int)
71
 
72
  response = model.chat(**generate_kwargs)
73
 
74
- generated_text = ""
75
  for new_text in response:
76
- generated_text += new_text
77
- yield(new_text, flush=True, end='')
78
 
79
 
80
 
 
71
 
72
  response = model.chat(**generate_kwargs)
73
 
74
+ buffer = ""
75
  for new_text in response:
76
+ buffer += new_text
77
+ yield buffer
78
 
79
 
80