Spaces:
Sleeping
Sleeping
yes or no responses
Browse files
app.py
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
-
def
|
| 4 |
-
|
|
|
|
| 5 |
|
| 6 |
print("Hello, world")
|
| 7 |
|
| 8 |
-
chatbot = gr.ChatInterface(
|
| 9 |
|
| 10 |
-
chatbot.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import random
|
| 3 |
|
| 4 |
+
def yes_no_response(message, history):
|
| 5 |
+
response = random.choice(["Yes", "No"])
|
| 6 |
+
return response
|
| 7 |
|
| 8 |
print("Hello, world")
|
| 9 |
|
| 10 |
+
chatbot = gr.ChatInterface(yes_no_response, type="messages")
|
| 11 |
|
| 12 |
+
chatbot.launch()
|