ChatbotLab / app.py
ritikaaA's picture
Update app.py
1918fab verified
raw
history blame contribute delete
637 Bytes
import gradio as gr
import random
# import lines go at the top! Any libraries I need to import go up ^
def magic_eight_ball(message, history):
return random.choice(['Possibly', 'Absolutely not', 'If you try', "Why not", 'Yes!'])
#def yes_or_no(message, history):
# return random.choice(['Yes','No'])
# always need two parameters in hf
# def echo(message, history):
# return message
print("hello world")
chatbot = gr.ChatInterface(magic_eight_ball, type="messages", title = "Magic Eight Ball Chat")
# declaring chatbot so that user can interact and see their conversation history and send new messages
chatbot.launch()