MsAsh commited on
Commit
bae4695
·
verified ·
1 Parent(s): 1dc2a13

yes no bot

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,8 +1,10 @@
1
  import gradio as gr
 
2
 
3
- def echo(message, chat_log):
4
- return message
 
5
 
6
- chatbot = gr.ChatInterface(echo)
7
 
8
  chatbot.launch()
 
1
  import gradio as gr
2
+ import random #this is the library we need
3
 
4
+ def respond_yes_no_randomly(message, chat_log):
5
+ responses = ["yes","no"]
6
+ return random.choice(responses)
7
 
8
+ chatbot = gr.ChatInterface(respond_yes_no_randomly)
9
 
10
  chatbot.launch()