Spaces:
Build error
Build error
Update app.py
Browse files12345677 unmodified lines151617181920212223242526272 unmodified lines3031323334import randomimport gradio as gr# Define a list of Magic 8 Ball responsesresponses = ["Without a doubt.","Ask again later.",7 unmodified lines"Most likely.",]# Define the response functiondef magic_8_ball(question):if question.strip() == "":return "Please ask a yes/no question!"return random.choice(responses)# Create the Gradio interfacechatbot = gr.Interface(fn=magic_8_ball,inputs=gr.Textbox(label="Ask the Magic 8 Ball a Yes/No Question:"),2 unmodified linesdescription="Ask a yes/no question and reveal your fate!")# Launch the appchatbot.launch()12345677 unmodified lines151617181920212223242526272 unmodified lines30313233import randomimport gradio as gr#Magic 8 Ball responsesresponses = ["Without a doubt.","Ask again later.",7 unmodified lines"Most likely.",]#response functiondef magic_8_ball(question):if question.strip() == "":return "Please ask a yes/no question!"return random.choice(responses)#Make the Gradio interfacechatbot = gr.Interface(fn=magic_8_ball,inputs=gr.Textbox(label="Ask the Magic 8 Ball a Yes/No Question:"),2 unmodified linesdescription="Ask a yes/no question and reveal your fate!")chatbot.launch()
app.py+3-4