Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,12 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import random
|
| 3 |
-
def yes_or_no(message, history):
|
| 4 |
-
return random.choice(['yes', 'no'])
|
| 5 |
# def echo(message, history):
|
| 6 |
# return message
|
|
|
|
|
|
|
| 7 |
print("Hello, World!")
|
| 8 |
-
chatbot = gr.ChatInterface(yes_or_no, type="messages", examples=['yes queen', 'no way jose', 'hmmmm ot sure'], title='Ask me anything!', description='Ask the chatbot any yes or no question to get a response. Chatbot not liable for consequences of bad advice.')
|
|
|
|
| 9 |
chatbot.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import random
|
| 3 |
+
# def yes_or_no(message, history):
|
| 4 |
+
# return random.choice(['yes', 'no'])
|
| 5 |
# def echo(message, history):
|
| 6 |
# return message
|
| 7 |
+
def magic_8_ball(message, history):
|
| 8 |
+
return random.choice(['Try again later', 'Go for it!', 'IDK girl do you...', 'Definitely!!! Maybe....', 'Danger! Don't you dare!', 'I wouldn't do that if i were you', 'Absolutely', 'That's a slay'])
|
| 9 |
print("Hello, World!")
|
| 10 |
+
#chatbot = gr.ChatInterface(yes_or_no, type="messages", examples=['yes queen', 'no way jose', 'hmmmm ot sure'], title='Ask me anything!', description='Ask the chatbot any yes or no question to get a response. Chatbot not liable for consequences of bad advice.')
|
| 11 |
+
eight_ball = gr.ChatInterface(magic_8_ball, type="messages", examples=['Will I pass the test?', 'Do they like me?', 'Should I bring an umbrella with me?', 'Should I text my ex?'], title="Magic 8 Ball", description="Ask the chatbot any yes or no question to get a response. Chatbot not liable for consequences of bad advice.")
|
| 12 |
chatbot.launch()
|