Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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="
|
| 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 |
|