Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,19 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
|
| 3 |
|
| 4 |
# Chat function: Respond with what we said
|
| 5 |
def echo(message, history):
|
| 6 |
return message
|
| 7 |
|
| 8 |
-
print('Hello World')
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
chatbot.launch()
|
| 13 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import random
|
| 3 |
|
| 4 |
# Chat function: Respond with what we said
|
| 5 |
def echo(message, history):
|
| 6 |
return message
|
| 7 |
|
|
|
|
| 8 |
|
| 9 |
+
def yes_no(message, history):
|
| 10 |
+
responses = ['Yes', 'No']
|
| 11 |
+
return random.choice(responses)
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
# print('Hello World')
|
| 15 |
+
|
| 16 |
+
chatbot = gr.ChatInterface(yes_no, type='messages')
|
| 17 |
|
| 18 |
chatbot.launch()
|
| 19 |
|