Spaces:
Sleeping
Sleeping
Create chatbot_test.py
Browse files- chatbot_test.py +9 -0
chatbot_test.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import random
|
| 2 |
+
imoport gradio as gr
|
| 3 |
+
|
| 4 |
+
def random_response(message, history):
|
| 5 |
+
return random.choice(["Yes", "No"])
|
| 6 |
+
|
| 7 |
+
demo = gr.ChatInterface(fn=random_response, type="messages", autofocus= 'False', title= 'Random answer chatbot')
|
| 8 |
+
|
| 9 |
+
demo.launch()
|