rrk757 commited on
Commit
51d373a
·
verified ·
1 Parent(s): d6f6191

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -3
app.py CHANGED
@@ -86,6 +86,15 @@ def respond(message,history):
86
  def display_image():
87
  return "Screenshot 2025-06-12 at 10.53.59 AM.png"
88
 
 
 
 
 
 
 
 
 
 
89
 
90
  with gr.Blocks (theme = theme) as chatbot:
91
  gr.Image(display_image())
@@ -124,9 +133,13 @@ with gr.Blocks (theme = theme) as chatbot:
124
  </a>
125
  # """)
126
  with gr.TabItem("Call a Hotline"):
127
- gr.Markdown(title_hotline)
128
- gr.Markdown(hotline_text)
129
-
 
 
 
 
130
  #with gr.Tab("Educational PDFs"):
131
  # gr.Markdown("### 📘 Helpful Resources")
132
 
 
86
  def display_image():
87
  return "Screenshot 2025-06-12 at 10.53.59 AM.png"
88
 
89
+ def show_info(topic):
90
+ responses = {
91
+ "General Health": 18009949662,
92
+ "Maternal Mental Health": 18338526262,
93
+ "Domestic Violence": 18007997233,
94
+ "Postpartum Support": 1-800-994-4773
95
+ }
96
+ return responses.get(topic, "Select a topic to see more info.")
97
+
98
 
99
  with gr.Blocks (theme = theme) as chatbot:
100
  gr.Image(display_image())
 
133
  </a>
134
  # """)
135
  with gr.TabItem("Call a Hotline"):
136
+ gr.Markdown(title_hotline)
137
+ gr.Markdown(hotline_text)
138
+ choices=["General Health", "Maternal Mental Health", "Domestic Violence", "Postpartum Support"],
139
+ label="Choose your hotline"
140
+ result_text = gr.Textbox(label="Hotlines")
141
+ # Show response when a choice is made
142
+ dropdown.change(fn=show_info, inputs=dropdown, outputs=output)
143
  #with gr.Tab("Educational PDFs"):
144
  # gr.Markdown("### 📘 Helpful Resources")
145