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()