ehioko commited on
Commit
08c22e7
·
verified ·
1 Parent(s): 1813154

magic 8 ball

Browse files
Files changed (1) hide show
  1. app.py +13 -5
app.py CHANGED
@@ -1,9 +1,17 @@
1
  import random
2
  import gradio as gr
3
 
4
- def echo(message, history):
5
- responses = ["yes", "no"]
6
- return random.choice(responses)
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
+