kaitwithkwk commited on
Commit
75b6f16
·
verified ·
1 Parent(s): 5891ecd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -21
app.py CHANGED
@@ -1,15 +1,13 @@
1
  ### ROUND 1 ###
2
- # import gradio as gr
3
-
4
- # def echo(message, history):
5
- # return message
6
 
7
- # demo = gr.ChatInterface(fn=echo, type="messages", examples=["hello", "hola", "merhaba"], title="Echo Bot")
8
- # demo.launch()
9
 
10
- # import gradio as gr
 
11
 
12
- ### ROUND 2 ###
13
  # import random
14
  # import gradio as gr
15
 
@@ -40,19 +38,19 @@
40
  # demo.launch()
41
 
42
  ### ROUND 4 ###
43
- import time
44
- import gradio as gr
45
 
46
- def slow_echo(message, history):
47
- for i in range(len(message)):
48
- time.sleep(0.05)
49
- yield "You typed: " + message[: i + 1]
50
 
51
- demo = gr.ChatInterface(
52
- slow_echo,
53
- type="messages",
54
- save_history=True,
55
- )
56
 
57
- if __name__ == "__main__":
58
- demo.launch()
 
1
  ### ROUND 1 ###
2
+ import gradio as gr
 
 
 
3
 
4
+ def echo(message, history):
5
+ return message
6
 
7
+ demo = gr.ChatInterface(fn=echo, type="messages", examples=["hello", "hola", "merhaba"], title="Echo Bot")
8
+ demo.launch()
9
 
10
+ ## ROUND 2 ###
11
  # import random
12
  # import gradio as gr
13
 
 
38
  # demo.launch()
39
 
40
  ### ROUND 4 ###
41
+ # import time
42
+ # import gradio as gr
43
 
44
+ # def slow_echo(message, history):
45
+ # for i in range(len(message)):
46
+ # time.sleep(0.05)
47
+ # yield "You typed: " + message[: i + 1]
48
 
49
+ # demo = gr.ChatInterface(
50
+ # slow_echo,
51
+ # type="messages",
52
+ # save_history=True,
53
+ # )
54
 
55
+ # if __name__ == "__main__":
56
+ # demo.launch()