Spaces:
Sleeping
Sleeping
yes or no function
Browse files
app.py
CHANGED
|
@@ -1,12 +1,17 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
#import lines go at the top!
|
| 3 |
|
| 4 |
-
def
|
|
|
|
|
|
|
|
|
|
| 5 |
#always need two inputs
|
| 6 |
-
return message
|
|
|
|
| 7 |
print("Hello, World")
|
| 8 |
|
| 9 |
-
chatbot = gr.ChatInterface(
|
| 10 |
#defining my chatbot so user can interact, see their conversation and send new messages
|
| 11 |
|
| 12 |
chatbot.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import random
|
| 3 |
#import lines go at the top!
|
| 4 |
|
| 5 |
+
def yes_or_no(message,history):
|
| 6 |
+
return random.choice(['Yes','No'])
|
| 7 |
+
|
| 8 |
+
#def echo(message, history):
|
| 9 |
#always need two inputs
|
| 10 |
+
#return message
|
| 11 |
+
|
| 12 |
print("Hello, World")
|
| 13 |
|
| 14 |
+
chatbot = gr.ChatInterface(yes_or_no, type='messages')
|
| 15 |
#defining my chatbot so user can interact, see their conversation and send new messages
|
| 16 |
|
| 17 |
chatbot.launch()
|