Spaces:
Runtime error
Runtime error
random response
Browse files
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()
|