Spaces:
Sleeping
Sleeping
create random yes or no response functions
Browse files
app.py
CHANGED
|
@@ -1,7 +1,11 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
-
chatbot = gr.ChatInterface(
|
| 7 |
chatbot.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import random
|
| 3 |
|
| 4 |
+
#Importing gradio for chatbox and random for responses
|
| 5 |
+
|
| 6 |
+
def respond_yes_or_no(message, history):
|
| 7 |
+
responses = ["Yes", "No"]
|
| 8 |
+
return random.choice(responses)
|
| 9 |
|
| 10 |
+
chatbot = gr.ChatInterface(respond_yes_or_no, type "messages")
|
| 11 |
chatbot.launch()
|