Spaces:
Sleeping
Sleeping
File size: 544 Bytes
35bd2b8 cdab10d 35bd2b8 cdab10d 1eecabc 35bd2b8 cdab10d 1eecabc cdab10d fc8e01d 35bd2b8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import gradio as gr
import random
def echo(message, history):
print("Hello, world!")
return message
def yes_or_no(message, history):
responses = ['yes', 'no']
print("message:", message)
print("history:", history)
return random.choice(responses)
chatbot = gr.ChatInterface(yes_or_no, type='messages', title="Yes or No Bot",
description = "This chatbot only responds with Yes or No",
examples = ["Is today my lucky day?", "Are you my mother?"])
chatbot.launch() |