Spaces:
Sleeping
Sleeping
magic 8 ball
Browse files
app.py
CHANGED
|
@@ -1,9 +1,17 @@
|
|
| 1 |
import random
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
-
def echo(message, history):
|
| 5 |
-
|
| 6 |
-
|
| 7 |
|
| 8 |
-
chatbot = gr.ChatInterface(echo, type = 'messages')
|
| 9 |
-
chatbot.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import random
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
+
# def echo(message, history):
|
| 5 |
+
# responses = ["ofc yes", "girl no"]
|
| 6 |
+
# return random.choice(responses)
|
| 7 |
|
| 8 |
+
# chatbot = gr.ChatInterface(echo, type = 'messages')
|
| 9 |
+
# chatbot.launch()
|
| 10 |
+
|
| 11 |
+
def magic_eight(message, answers):
|
| 12 |
+
answers = ["your heart knows the answer", "trust your gut", "the truth lies before you", "follow the wind", "danger lurks around"]
|
| 13 |
+
return random.choice(answers)
|
| 14 |
+
|
| 15 |
+
chatbot = gr.ChatInterface(magic_eight, type = 'messages')
|
| 16 |
+
chatbot.launch()
|
| 17 |
+
|