kaitwithkwk commited on
Commit
e5e0b7b
·
verified ·
1 Parent(s): d9e3136

Change function to return yes/no

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -1,10 +1,9 @@
1
  import gradio as gr
 
2
 
3
- def echo(message, history):
4
- return message
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 respond(message, history):
5
+ responses = ["Yes", "No"]
6
+ return random.choice(responses)
 
 
 
7
 
8
+ chatbot = gr.ChatInterface(respond, type="messages")
9
  chatbot.launch()