Spaces:
Runtime error
Runtime error
Update app.py
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 |
-
|
|
|
|
| 9 |
|
| 10 |
chatbot.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import random
|
| 3 |
|
| 4 |
+
def respond_yes_no_random(message, history):
|
| 5 |
+
responses = ["yes" , "No"]
|
| 6 |
+
return random.choice(responses)
|
| 7 |
|
|
|
|
| 8 |
|
| 9 |
+
|
| 10 |
+
chatbot = gr.ChatInterface(respond_yes_no_random, type="messages") , title="Yes No Bot"
|
| 11 |
|
| 12 |
chatbot.launch()
|