zac commited on
Commit
428c8e6
·
1 Parent(s): 63846c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -25,8 +25,10 @@ def generate_text(input_text, history):
25
  stream = copy.deepcopy(out)
26
  print(stream["choices"][0]["text"])
27
  history =["init",input_text_with_history]
28
- yield output
29
-
 
 
30
 
31
  demo = gr.ChatInterface(generate_text)
32
  demo.queue(concurrency_count=1, max_size=5)
 
25
  stream = copy.deepcopy(out)
26
  print(stream["choices"][0]["text"])
27
  history =["init",input_text_with_history]
28
+ for i in range(len(output)):
29
+ time.sleep(0.3)
30
+ yield "You typed: " + output[: i+1]
31
+
32
 
33
  demo = gr.ChatInterface(generate_text)
34
  demo.queue(concurrency_count=1, max_size=5)