zac commited on
Commit
601f061
·
1 Parent(s): ef9d113

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -23,11 +23,11 @@ def generate_text(input_text, history):
23
  response = output['choices'][0]['text'] + "\n"
24
  print("response", response)
25
  history =["init",input_text_with_history]
26
- bot_message = response
27
- for character in bot_message:
28
- history[-1][1] += character
29
- time.sleep(0.05)
30
- yield history
31
 
32
 
33
  demo = gr.ChatInterface(generate_text)
 
23
  response = output['choices'][0]['text'] + "\n"
24
  print("response", response)
25
  history =["init",input_text_with_history]
26
+ for character in history:
27
+ time.sleep(0.05)
28
+ yield history
29
+
30
+
31
 
32
 
33
  demo = gr.ChatInterface(generate_text)