import gradio as gr import random def magic_8_ball(message, history): responses = [ "Without a doubt.", "Yes, definitely.", "Ask again later.", "My sources say no.", "Outlook not so good.", "Signs point to yes.", "Cannot predict now.", "Very doubtful." ] return random.choice(responses) chatbot = gr.ChatInterface(magic_8_ball) chatbot.launch()