Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,16 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
# first, add your import lines
|
| 3 |
|
| 4 |
-
def
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
| 6 |
# Code the function that your chatbot will run!
|
| 7 |
|
| 8 |
print("Hello world")
|
| 9 |
-
chatbot = gr.ChatInterface(
|
| 10 |
# Use gradio to create an interface where your user can use ChatInterface --> needs a function as a parameter to run
|
| 11 |
|
| 12 |
chatbot.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import random
|
| 3 |
# first, add your import lines
|
| 4 |
|
| 5 |
+
def yes_or_no(message, history):
|
| 6 |
+
responses = ["Yes", "No"]
|
| 7 |
+
return responses.choice(responses)
|
| 8 |
+
# def echo(message, history):
|
| 9 |
+
# return message
|
| 10 |
# Code the function that your chatbot will run!
|
| 11 |
|
| 12 |
print("Hello world")
|
| 13 |
+
chatbot = gr.ChatInterface(yes_or_no, type="messages")
|
| 14 |
# Use gradio to create an interface where your user can use ChatInterface --> needs a function as a parameter to run
|
| 15 |
|
| 16 |
chatbot.launch()
|