kaitwithkwk commited on
Commit
50e5a19
·
verified ·
1 Parent(s): 75b6f16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -1,23 +1,23 @@
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
 
14
- # def random_response(message, history):
15
- # return random.choice(["Yes", "No"])
16
 
17
- # demo = gr.ChatInterface(random_response, type="messages", autofocus=True)
18
 
19
- # if __name__ == "__main__":
20
- # demo.launch()
21
 
22
 
23
  ### ROUND 3 ###
 
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
 
14
+ def random_response(message, history):
15
+ return random.choice(["Yes", "No"])
16
 
17
+ demo = gr.ChatInterface(random_response, type="messages", autofocus=True)
18
 
19
+ if __name__ == "__main__":
20
+ demo.launch()
21
 
22
 
23
  ### ROUND 3 ###