consy commited on
Commit
1f9d5e8
·
verified ·
1 Parent(s): 9f5f8f8

magic eight ball practice

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -2,8 +2,10 @@ import gradio as gr
2
  import random
3
  #import lines go at the top!
4
 
5
- def yes_or_no(message,history):
6
- return random.choice(['Yes','No'])
 
 
7
 
8
  #def echo(message, history):
9
  #always need two inputs
@@ -11,7 +13,7 @@ def yes_or_no(message,history):
11
 
12
  print("Hello, World")
13
 
14
- chatbot = gr.ChatInterface(yes_or_no, type='messages')
15
  #defining my chatbot so user can interact, see their conversation and send new messages
16
 
17
  chatbot.launch()
 
2
  import random
3
  #import lines go at the top!
4
 
5
+ def magic_ball(message, history):
6
+ return random.choice(['Try again!','Maybe','Without a doubt'])
7
+ #def yes_or_no(message,history):
8
+ #return random.choice(['Yes','No'])
9
 
10
  #def echo(message, history):
11
  #always need two inputs
 
13
 
14
  print("Hello, World")
15
 
16
+ chatbot = gr.ChatInterface(magic_ball, type='messages')
17
  #defining my chatbot so user can interact, see their conversation and send new messages
18
 
19
  chatbot.launch()