TeahReichenbaum commited on
Commit
74c0037
·
verified ·
1 Parent(s): c808474

MagicEightBall.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -4,10 +4,15 @@ import random
4
  # def echo (message, hisotry)
5
  # return (message)
6
 
7
- def yesNoRandom(message,history):
8
- repsonse=["yes","no"]
9
- return random.choice(repsonse)
10
 
11
- chatbot = gr.ChatInterface(yesNoRandom, type = "messages", title = "Yes or No Bot", description = "This chatbot randomly repsonds to questions with yes or no.")
 
 
 
 
 
12
 
13
  chatbot.launch()
 
4
  # def echo (message, hisotry)
5
  # return (message)
6
 
7
+ # def yesNoRandom(message,history):
8
+ # repsonse=["yes","no"]
9
+ # return random.choice(repsonse)
10
 
11
+ # chatbot = gr.ChatInterface(yesNoRandom, type = "messages", title = "Yes or No Bot", description = "This chatbot randomly repsonds to questions with yes or no.")
12
+
13
+ def magicEightBall(message,history)
14
+ response=["It's certain", "Try Again", "Chances are low", "Yes", "no", "Unlikley", "likley","Ask later"]
15
+ return random.choice(response)
16
+ chatbot=gr.ChatInterface(magicEightBall, type="messages", title,"Magic eight Ball",theme='d8ahazard/material_design_rd')
17
 
18
  chatbot.launch()