ChatbotLab4.7 / app.py
DeepshikhaP's picture
magic_8_ball_version.py
bd67a09 verified
raw
history blame
698 Bytes
import gradio as gr
import random
# impost lines go at the top! Any libaries that I need to imprt go up here ^^
def yes_or_no(message, history):
return random.choice(['Yes', 'No', 'No one saw this, close this tab right now!', 'Yes, what on earth are you even waiting for?!! Go for it!!', 'There's a 50-50 chance my friend', 'Here, why don't you try again?', 'Don't worry, today just wasn't your day :(', 'Duh, isn't it so obvious?'])
# def echo(message, history):
# return message
print("Hello World!")
chatbot = gr.ChatInterface(yes_or_no, type = "messages")
# Definig my chatbot so that the user can interact and see their conversation history and send new messages
chatbot.launch()