likewendy commited on
Commit
ee9845f
·
1 Parent(s): cfdb97e
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -57,7 +57,8 @@ def respond(
57
  thread.start()
58
  # Print the generated text in real-time
59
  for new_text in streamer:
60
- response += tokenizer.decode(tokenizer.encode(new_text), skip_special_tokens=True)
 
61
  yield response
62
 
63
  with gr.Blocks() as demo:
 
57
  thread.start()
58
  # Print the generated text in real-time
59
  for new_text in streamer:
60
+ response += new_text
61
+ response = tokenizer.decode(tokenizer.encode(response), skip_special_tokens=True)
62
  yield response
63
 
64
  with gr.Blocks() as demo: