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