demetz commited on
Commit
f4a92ce
·
verified ·
1 Parent(s): a59bc9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -3,14 +3,15 @@ import gradio as gr
3
 
4
  def magicEight(message, history):
5
  answers = ["The outlook is good!", "No, sorry", "Maybe", "Ask me again"]
6
- message = random.choice(answers)
7
- return message
8
 
9
- initial_message = [("assistant", "Welcome! Ask the Magic Eight Ball your question!")]
10
  chatbot = gr.ChatInterface(
11
  magicEight,
12
- chatbot=gr.Chatbot(value=initial_message),
13
- type="messages"
 
 
14
  )
15
 
16
- chatbot.launch()
 
3
 
4
  def magicEight(message, history):
5
  answers = ["The outlook is good!", "No, sorry", "Maybe", "Ask me again"]
6
+ response = random.choice(answers)
7
+ return response
8
 
 
9
  chatbot = gr.ChatInterface(
10
  magicEight,
11
+ type="messages",
12
+ examples=None,
13
+ title="Magic Eight Ball",
14
+ description="Welcome! 🎱 Ask the Magic Eight Ball your question!"
15
  )
16
 
17
+ chatbot.launch()