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