Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,17 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
return message
|
5 |
|
6 |
print("Hello, world!")
|
7 |
|
8 |
-
chatbot = gr.ChatInterface(
|
9 |
|
10 |
chatbot.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
import random
|
3 |
|
4 |
+
answers = ["the outlook is good", "no, sorry", "maybe", "ask me again"]
|
5 |
+
|
6 |
+
def magicEight(message, history):
|
7 |
+
|
8 |
+
message = random.choice(answers)
|
9 |
+
|
10 |
+
|
11 |
return message
|
12 |
|
13 |
print("Hello, world!")
|
14 |
|
15 |
+
chatbot = gr.ChatInterface(magicEight, type="messages")
|
16 |
|
17 |
chatbot.launch()
|