gerasdf commited on
Commit
9797e66
·
verified ·
1 Parent(s): 6547462
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,7 +1,11 @@
1
  import gradio as gr
 
2
 
3
  def chat(message, history):
4
- return str(message)
 
 
 
5
 
6
  demo = gr.ChatInterface(
7
  fn=chat,
 
1
  import gradio as gr
2
+ import time
3
 
4
  def chat(message, history):
5
+ answer = str(message)
6
+ for i in range(len(answer)):
7
+ time.sleep(0.3)
8
+ yield answer[:i+1]
9
 
10
  demo = gr.ChatInterface(
11
  fn=chat,