annakcarls commited on
Commit
6ebd9f9
·
verified ·
1 Parent(s): 2472f4f

yes or no responses

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -1,10 +1,12 @@
1
  import gradio as gr
 
2
 
3
- def yes(message, history):
4
- return "yes"
 
5
 
6
  print("Hello, world")
7
 
8
- chatbot = gr.ChatInterface(echo, type="messages")
9
 
10
- chatbot.launch()
 
1
  import gradio as gr
2
+ import random
3
 
4
+ def yes_no_response(message, history):
5
+ response = random.choice(["Yes", "No"])
6
+ return response
7
 
8
  print("Hello, world")
9
 
10
+ chatbot = gr.ChatInterface(yes_no_response, type="messages")
11
 
12
+ chatbot.launch()