Spaces:
Sleeping
Sleeping
Update app.py
Browse filesadded variety of responses
app.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import random
|
| 3 |
|
| 4 |
-
def
|
| 5 |
-
responses = ["yes", "no"]
|
| 6 |
return random.choice(responses)
|
| 7 |
|
| 8 |
print("Hello, world!")
|
| 9 |
|
| 10 |
-
chatbot = gr.ChatInterface(
|
| 11 |
chatbot.launch() #displays the chatbot
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import random
|
| 3 |
|
| 4 |
+
def response_system(message, history):
|
| 5 |
+
responses = ["yes", "no", "maybe", "I don't think so", "I think so", "What kind of a question is that?", "Are you sure you want to know?", "I'm not telling XD", "You ask too many questions", "That depends on you", "Without a doubt"]
|
| 6 |
return random.choice(responses)
|
| 7 |
|
| 8 |
print("Hello, world!")
|
| 9 |
|
| 10 |
+
chatbot = gr.ChatInterface(response_system, type = "messages", title = "8 Ball") #chatbot UI = conversation history and user input
|
| 11 |
chatbot.launch() #displays the chatbot
|