Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import random
|
3 |
+
|
4 |
+
|
5 |
+
def echo(message, history):
|
6 |
+
return(message)
|
7 |
+
|
8 |
+
def yes_no(message, history):
|
9 |
+
responses = ["Yes", "No", "Maybe"]
|
10 |
+
return random.choice(responses)
|
11 |
+
|
12 |
+
|
13 |
+
chatbot = gr.ChatInterface(yes_no, type = "messages", title="Magic 8 Ball", description = "a chatbot that gives you answers.", theme="citrus")
|
14 |
+
|
15 |
+
chatbot.launch()
|