smriti-m commited on
Commit
662f31a
·
verified ·
1 Parent(s): 4908b5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -4,16 +4,11 @@ import random
4
  def echo(message, history):
5
  return message
6
  def yes_no(message, history):
7
- responses = ["Yes.", "No.", "All signs point to yes.", "All signs point to no. ", "Positive.","Negative.", "Hmm... Try again later.", "Affirmative."]
8
  return random.choice(responses)
9
 
10
- css = ".gradio-container {background-color: #181b78;}"
11
- with gr.Blocks(css=css) as demo:
12
- text_output = gr.Textbox(label="Output")
13
- text_input = gr.Textbox(label="Input", placeholder="Enter text here")
14
- text_input.change(lambda x: x, text_input, text_output)
15
 
16
  print("Hello, world!")
17
- chatbot = gr.ChatInterface(yes_no, type="messages", title="My ChatBot!", description = "This is the chatbot of chatbots.", theme = "shivi/calm_seafoam")
18
  chatbot.launch()
19
 
 
4
  def echo(message, history):
5
  return message
6
  def yes_no(message, history):
7
+ responses = ["Yes.", "No.", "All signs point to yes.", "All signs point to no. ", "Positive.","Negative.", "Hmm... Try again later.", "Affirmative.","Haha! In your dreams."]
8
  return random.choice(responses)
9
 
 
 
 
 
 
10
 
11
  print("Hello, world!")
12
+ chatbot = gr.ChatInterface(yes_no, type="messages", title="Magic 8 Ball Bot!", description = "🧙🏽‍♀️", theme = "shivi/calm_seafoam")
13
  chatbot.launch()
14