Amanda Sackey commited on
Commit
87dc15e
·
verified ·
1 Parent(s): 88bba50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -1,9 +1,11 @@
1
  import gradio as gr
 
2
 
3
- def echo(message, history):
4
- return message
 
5
 
6
- print("Hello World")
7
- chatbot = gr.ChatInterface(echo, type="messages") #chatbot UI - conversion history and user input
8
 
9
  chatbot.launch()
 
1
  import gradio as gr
2
+ import random
3
 
4
+ def respond_yes_no_randomly(message, history):
5
+ responses = ["Yes","No"] #added here
6
+ return random.choice(responses) #added here
7
 
8
+ print("Hello World!")
9
+ chatbot = gr.ChatInterface(respond_yes_no_randomly, type="messages", title = "Yes No BOT") #chatbot UI - conversion history and user input
10
 
11
  chatbot.launch()