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