Spaces:
Sleeping
Sleeping
coded yes_or_no function
Browse files
app.py
CHANGED
|
@@ -1,12 +1,16 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
#import lines fo at the top! Any libraries I need to import go here
|
| 3 |
|
| 4 |
-
def
|
| 5 |
-
return
|
|
|
|
|
|
|
|
|
|
| 6 |
#a function that the user's message is repeated back to you
|
| 7 |
|
| 8 |
print("Hello World")
|
| 9 |
-
chatbot = gr.ChatInterface(
|
| 10 |
#defining my chatbot so that the user can interact and see their conversation history and send me messages
|
| 11 |
|
| 12 |
chatbot.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import random
|
| 3 |
#import lines fo at the top! Any libraries I need to import go here
|
| 4 |
|
| 5 |
+
def yes_or_no(message, history):
|
| 6 |
+
return random.choice(['Yes', "No"])
|
| 7 |
+
|
| 8 |
+
#def echo(message, history):
|
| 9 |
+
#return message
|
| 10 |
#a function that the user's message is repeated back to you
|
| 11 |
|
| 12 |
print("Hello World")
|
| 13 |
+
chatbot = gr.ChatInterface(yes_or_no, type="messages")
|
| 14 |
#defining my chatbot so that the user can interact and see their conversation history and send me messages
|
| 15 |
|
| 16 |
chatbot.launch()
|