Spaces:
Sleeping
Sleeping
codedyes_or_noFunction.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,18 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
# impost lines go at the top! Any libaries that I need to imprt go up here ^^
|
| 3 |
|
| 4 |
-
def
|
| 5 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
print("Hello World!")
|
| 8 |
-
chatbot = gr.ChatInterface(
|
| 9 |
# Definig my chatbot so that the user can interact and see their conversation history and send new messages
|
| 10 |
|
| 11 |
chatbot.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import random
|
| 3 |
# impost lines go at the top! Any libaries that I need to imprt go up here ^^
|
| 4 |
|
| 5 |
+
def yes_or_no(message, history):
|
| 6 |
+
return random.choice(['Yes', 'No'])
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
# def echo(message, history):
|
| 10 |
+
# return message
|
| 11 |
+
|
| 12 |
+
|
| 13 |
|
| 14 |
print("Hello World!")
|
| 15 |
+
chatbot = gr.ChatInterface(yes_or_no, type = "messages")
|
| 16 |
# Definig my chatbot so that the user can interact and see their conversation history and send new messages
|
| 17 |
|
| 18 |
chatbot.launch()
|