Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,14 +3,15 @@ import gradio as gr
|
|
3 |
|
4 |
def magicEight(message, history):
|
5 |
answers = ["The outlook is good!", "No, sorry", "Maybe", "Ask me again"]
|
6 |
-
|
7 |
-
return
|
8 |
|
9 |
-
initial_message = [("assistant", "Welcome! Ask the Magic Eight Ball your question!")]
|
10 |
chatbot = gr.ChatInterface(
|
11 |
magicEight,
|
12 |
-
|
13 |
-
|
|
|
|
|
14 |
)
|
15 |
|
16 |
-
chatbot.launch()
|
|
|
3 |
|
4 |
def magicEight(message, history):
|
5 |
answers = ["The outlook is good!", "No, sorry", "Maybe", "Ask me again"]
|
6 |
+
response = random.choice(answers)
|
7 |
+
return response
|
8 |
|
|
|
9 |
chatbot = gr.ChatInterface(
|
10 |
magicEight,
|
11 |
+
type="messages",
|
12 |
+
examples=None,
|
13 |
+
title="Magic Eight Ball",
|
14 |
+
description="Welcome! 🎱 Ask the Magic Eight Ball your question!"
|
15 |
)
|
16 |
|
17 |
+
chatbot.launch()
|