rrk757 commited on
Commit
36161ce
·
verified ·
1 Parent(s): 6b3d127

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -46,6 +46,10 @@ def get_top_chunks(query):
46
  client = InferenceClient("google/gemma-3-27b-it")
47
 
48
  def respond(message,history):
 
 
 
 
49
  messages = [{"role": "system" , "content": "Your name is BloomBot and you're a supportive and helpful chatbot catered towards teens ages 10-18. You give clear kid-appropiate explainations and keep your explainations to 10 sentences maximum."
50
  }]
51
  if history:
@@ -88,6 +92,16 @@ with gr.Blocks (theme=theme) as chatbot:
88
  "What should I know about puberty?",
89
  "Where can I find my nearest OBGYN?"]
90
  )
 
 
 
 
 
 
 
 
 
 
91
  with gr.Tab("Resources"):
92
  gr.Markdown("### Resources")
93
  gr.HTML("""
 
46
  client = InferenceClient("google/gemma-3-27b-it")
47
 
48
  def respond(message,history):
49
+ if "nearest obgyn" in message.lower():
50
+ # Return a custom response (for UI to act on)
51
+ return "Sure! Please click on the 'OBGYN Finder' tab above to get started. 🩺", history
52
+ #obgyn command, delete if it doesn't work
53
  messages = [{"role": "system" , "content": "Your name is BloomBot and you're a supportive and helpful chatbot catered towards teens ages 10-18. You give clear kid-appropiate explainations and keep your explainations to 10 sentences maximum."
54
  }]
55
  if history:
 
92
  "What should I know about puberty?",
93
  "Where can I find my nearest OBGYN?"]
94
  )
95
+ with gr.Tab("OBGYN Finder") as obgyn_tab:
96
+ gr.Markdown("### Find a Nearby OBGYN")
97
+ location_dropdown = gr.Dropdown(
98
+ choices=["New York", "California", "Texas", "Florida"],
99
+ label="Choose your state"
100
+ )
101
+ result_text = gr.Textbox(label="Nearby Clinics")
102
+ location_dropdown.change(fn=show_obgyn_info, inputs=location_dropdown, outputs=result_text)
103
+ #obgyn finder tab
104
+
105
  with gr.Tab("Resources"):
106
  gr.Markdown("### Resources")
107
  gr.HTML("""