isabelle7 commited on
Commit
8844b2b
·
verified ·
1 Parent(s): 01868be

random response

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import random
3
+
4
+ def respond_yes_no_randomly(message, history):
5
+ responses = ["Yes", "No"]
6
+ return random.choice(responses)
7
+
8
+ chatbot = gr.ChatInterface(respond_yes_no_randomly, title="Yes No Bot",
9
+ description="This chatbot responds yes or no to your questions!")
10
+
11
+ chatbot.launch()