sarahrobe commited on
Commit
8d2594d
·
verified ·
1 Parent(s): a6f0359

Update app.py

Browse files

Changed response to be yes or no

Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,9 +1,11 @@
1
  import gradio as gr
 
2
 
3
- def echo(message, history):
4
- return message
 
5
 
6
- chatbot = gr.ChatInterface(echo)
7
  chatbot.launch()
8
 
9
 
 
1
  import gradio as gr
2
+ import random
3
 
4
+ def respond_randomly(message, history):
5
+ message_options = ["yes", "no"]
6
+ return random.choice(message_options)
7
 
8
+ chatbot = gr.ChatInterface(respond_randomly)
9
  chatbot.launch()
10
 
11