ChatbotLab / app.py
demetz's picture
Update app.py
a59bc9c verified
raw
history blame
419 Bytes
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()