import gradio as gr import random def echo(message, history): return(message) def yes_no(message, history): responses = ["It is certain", "It is decidedly so", "Without a doubt", "Don't count on it","My sources say no","Very doubtful","Reply hazy, try again","Better not tell you now"] return random.choice(responses) chatbot = gr.ChatInterface(yes_no, type = "messages", title="Magic 8 Ball", description = "a chatbot that gives you answers.", theme="Taithrah/Minimal") chatbot.launch()