File size: 2,314 Bytes
b42b4a7
15f8ac3
b42b4a7
 
15f8ac3
 
83795f2
15f8ac3
 
b42b4a7
 
83795f2
3561d31
e94cb87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18fcee9
e94cb87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83795f2
03565a5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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)