Sev-X commited on
Commit
9f36fad
·
verified ·
1 Parent(s): 5b762eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -1,9 +1,9 @@
1
- import random
2
-
3
- def random_response(message, history):
4
- return random.choice(["Yes", "No"])
5
-
6
  import gradio as gr
7
 
8
- gr.ChatInterface(random_response).launch()
 
 
 
9
 
 
 
1
+ import time
 
 
 
 
2
  import gradio as gr
3
 
4
+ def slow_echo(message, history):
5
+ for i in range(len(message)):
6
+ time.sleep(0.3)
7
+ yield "You typed: " + message[: i+1]
8
 
9
+ gr.ChatInterface(slow_echo).launch()