chatbot-testing / app.py
hsendhilvel's picture
Update app.py
3561d31 verified
Raw
History Blame Contribute Delete
2.31 kB
import gradio as gr
import random
def respond(message, history):
responses = ["Yes", "No"]
return random.choice(responses)
custom_chatbot = gr.Chatbot(
value=[{"role": "assistant", "content": "Hello! I am the Yes No Bot. Ask me anything!"}]
)
with gr.Blocks() as chatbot:
# 1. Chatbot Viewport Container
gr.ChatInterface(
respond,
title="Dolores",
editable=True,
description="Hi, I'm Dolores, your personal AI assistant that specializes in helping women and gender minorities deal with economic mistreatment in the workplace. Whether it's drafting an email to your superiors or helping you navigate through local laws, I am here to support you every step of the way. Try inputing one of the sample prompts, or feel free to ask me anything!",
examples=[
"Iโ€™m a senior analyst at my company but my boss refuses to give me a raise even though my male colleagues have all received some. How can I bring this up to HR?",
"How can I negotiate for better pay?",
"How can I tell if I am experiencing economic abuse?",
"What are laws that I should be aware of if I believe I am facing financial abuse due to my gender?"
]
)
# 2. NEW BLOCK: Quick Links & Helpful Resources
# This creates a visually clean layout area divided into two helpful columns
gr.Markdown("---") # Visual divider line
gr.Markdown("## ๐Ÿ“š Quick Links & Support Resources")
with gr.Row():
with gr.Column():
gr.Markdown("""
### โš–๏ธ Legal & Workplace Rights
* [EEOC - Filing a Charge of Discrimination](https://eeoc.gov)
* [Equal Rights Advocates - Workplace Help](https://equalrights.org)
* [AAUW - Know Your Rights: Workplace Laws](https://aauw.org)
""")
with gr.Column():
gr.Markdown("""
### ๐Ÿ› ๏ธ Financial Support & Toolkits
* [National Network to End Domestic Violence (NNEDV) - Economic Justice](https://nnedv.org)
* [Free Salary Negotiation & Market Value Tool (Glassdoor)](https://glassdoor.com)
* [Women's Bureau - US Department of Labor Resources](https://dol.gov)
""")
chatbot.launch(share=True, debug=True)