Update app.py
Browse files44 unmodified lines4546474849505152535455484950515253545556575859585960616162636444 unmodified lines10911011111211211311411544 unmodified lines
client = 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.")#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():#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 # return "Sure! Please click on the 'OBGYN Finder' tab above to get started. 🩺", history#obgyn command, delete if it doesn't work 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." }]44 unmodified lines label="Choose your state" ) result_text = gr.Textbox(label="Nearby Clinics") location_dropdown.change(fn=show_obgyn_info, inputs=location_dropdown, outputs=result_text) # location_dropdown.change(fn=show_obgyn_info, inputs=location_dropdown, outputs=result_text) #obgyn finder tab with gr.Tab("Resources"):app.py+12-12