Spaces:
Sleeping
Sleeping
Coded yes_or_no function
Browse files
app.py
CHANGED
|
@@ -1,10 +1,15 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
# import lines go at the top! Any libraries i need to import go up here ^^
|
| 3 |
|
| 4 |
-
def
|
| 5 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
print("Hello, world!")
|
| 7 |
-
chatbot = gr.ChatInterface(
|
| 8 |
# defining my chatbot so that the user can interact and see their conversation history and send new messages
|
| 9 |
|
| 10 |
chatbot.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import random
|
| 3 |
# import lines go at the top! Any libraries i need to import go up 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 |
+
|
| 11 |
print("Hello, world!")
|
| 12 |
+
chatbot = gr.ChatInterface(yes_or_no, type="messages")
|
| 13 |
# defining my chatbot so that the user can interact and see their conversation history and send new messages
|
| 14 |
|
| 15 |
chatbot.launch()
|