Spaces:
Sleeping
Sleeping
magic eight ball practice
Browse files
app.py
CHANGED
|
@@ -2,8 +2,10 @@ import gradio as gr
|
|
| 2 |
import random
|
| 3 |
#import lines go at the top!
|
| 4 |
|
| 5 |
-
def
|
| 6 |
-
return random.choice(['
|
|
|
|
|
|
|
| 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(
|
| 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()
|