import gradio as gr import random responses = [ "Without a doubt.", "Outlook not so good.", "Ask again later.", "Yes, definitely!", "My sources say no.", "Signs point to yes.", "Don't count on it.", "It is certain.", "Very doubtful.", "Better not tell you now.", "No way.", "For sure!", "NEVER!!" ] def magic_8_ball(message, history): return random.choice(responses) chatbot = gr.ChatInterface(magic_8_ball) chatbot.launch()