import gradio as gr import random def yes_or_no(message, history): responses = ['yes', 'no'] return random.choice(responses) chatbot = gr.ChatInterface(yes_or_no, type ='messages') chatbot.launch()