Spaces:
Sleeping
Sleeping
added a magic 8 ball function with 9 different responses
Browse files
app.py
CHANGED
|
@@ -9,5 +9,8 @@ def echo(message, history):
|
|
| 9 |
def random_response(message, history):
|
| 10 |
return random.choice(["Yes", "No"])
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
| 13 |
chatbot.launch()
|
|
|
|
| 9 |
def random_response(message, history):
|
| 10 |
return random.choice(["Yes", "No"])
|
| 11 |
|
| 12 |
+
def magic_8_ball(message, history):
|
| 13 |
+
return random.choice(["It is certain", "Most likely", "Yes", "You may rely on it", "Ask again later", "Don't count on it", "My sources say no", "Cannot predict now", "Outlook not so good"])
|
| 14 |
+
|
| 15 |
+
chatbot = gr.ChatInterface(magic_8_ball, type = 'messages')
|
| 16 |
chatbot.launch()
|