Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import random #enables access to random library on python | |
| # import lines go at the top! Any libraries I need to import go up here ^^ | |
| def yes_or_no(message, history): | |
| return random.choice(['It is certain', 'It is decidedly so', 'Without a doubt', 'Yes definitely', 'As I see it, yes', 'Most likely', 'Yes', 'Signs point to yes', 'Reply hazy, try again', 'Ask again later', 'Better not tell you now', 'Cannot predict now', 'Concentrate and ask again', 'My reply is no', 'My sources say no', 'Very doubtful']) | |
| # def echo(message, history): | |
| # return message | |
| print("Hello World!") | |
| chatbot = gr.ChatInterface(yes_or_no, type="messages", title="Magic 8 Ball", description="This Magic 8-Ball is a novelty toy that provides answers to yes/no questions.", theme="soft") | |
| # defining mt chatbot so that the user can interact and see their conversation history and send new messages | |
| chatbot.launch() |