Spaces:
Sleeping
Sleeping
import random | |
import gradio as gr | |
def magicEight(message, history): | |
answers = ["The outlook is good!", "No, sorry", "Maybe", "Ask me again"] | |
message = random.choice(answers) | |
return message | |
initial_message = [("assistant", "Welcome! Ask the Magic Eight Ball your question!")] | |
chatbot = gr.ChatInterface( | |
magicEight, | |
chatbot=gr.Chatbot(value=initial_message), | |
type="messages" | |
) | |
chatbot.launch() |