Update app.py
Browse files44 unmodified lines454647484950515253545556575859606162636444 unmodified lines10911011111211311411544 unmodified linesclient = InferenceClient("google/gemma-3-27b-it")def show_obgyn_info(location):clinics = {"New York": "NY Clinic A, NY Clinic B, NY Clinic C","California": "CA Clinic X, CA Clinic Y, CA Clinic Z","Texas": "TX Clinic 1, TX Clinic 2, TX Clinic 3","Florida": "FL Clinic Alpha, FL Clinic Beta, FL Clinic Gamma"}return clinics.get(location, "Sorry, no clinics found for this location.")#delete if doesnt work, supposed to define fn functiondef respond(message,history):if "nearest obgyn" in message.lower():# Return a custom response (for UI to act on)return "Sure! Please click on the 'OBGYN Finder' tab above to get started. 🩺", history#obgyn command, delete if it doesn't workmessages = [{"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."}]44 unmodified lineslabel="Choose your state")result_text = gr.Textbox(label="Nearby Clinics")location_dropdown.change(fn=show_obgyn_info, inputs=location_dropdown, outputs=result_text)#obgyn finder tabwith gr.Tab("Resources"):44 unmodified lines454647484950515253545556575859606162636444 unmodified lines10911011111211311411544 unmodified linesclient = InferenceClient("google/gemma-3-27b-it")#def show_obgyn_info(location):#clinics = {# "New York": "NY Clinic A, NY Clinic B, NY Clinic C",# "California": "CA Clinic X, CA Clinic Y, CA Clinic Z",# "Texas": "TX Clinic 1, TX Clinic 2, TX Clinic 3",# "Florida": "FL Clinic Alpha, FL Clinic Beta, FL Clinic Gamma"# }# return clinics.get(location, "Sorry, no clinics found for this location.")#delete if doesnt work, supposed to define fn function#def respond(message,history):# if "nearest obgyn" in message.lower():# Return a custom response (for UI to act on)# return "Sure! Please click on the 'OBGYN Finder' tab above to get started. 🩺", history#obgyn command, delete if it doesn't workmessages = [{"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."}]44 unmodified lineslabel="Choose your state")result_text = gr.Textbox(label="Nearby Clinics")# location_dropdown.change(fn=show_obgyn_info, inputs=location_dropdown, outputs=result_text)#obgyn finder tabwith gr.Tab("Resources"):
app.py+12-12