Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,22 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
chatbot.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import random
|
| 3 |
|
| 4 |
+
responses = [
|
| 5 |
+
"Without a doubt.",
|
| 6 |
+
"Outlook not so good.",
|
| 7 |
+
"Ask again later.",
|
| 8 |
+
"Yes, definitely!",
|
| 9 |
+
"My sources say no.",
|
| 10 |
+
"Signs point to yes.",
|
| 11 |
+
"Don't count on it.",
|
| 12 |
+
"It is certain.",
|
| 13 |
+
"Very doubtful.",
|
| 14 |
+
"Better not tell you now."
|
| 15 |
+
]
|
| 16 |
|
| 17 |
+
def random(message, history):
|
| 18 |
+
return random.choice(responses)
|
| 19 |
+
|
| 20 |
+
chatbot = gr.ChatInterface(random)
|
| 21 |
|
| 22 |
chatbot.launch()
|