Spaces:
Build error
Build error
Update app.py
Browse files2 unmodified lines345678937 unmodified lines4748495051527 unmodified lines6061626364656667686970712 unmodified lines# Function to load the menu data from Exceldef load_menu():menu_file = "menu.xlsx" # Make sure this file exists in the same directorytry:return pd.read_excel(menu_file)except Exception as e:37 unmodified lines# Gradio app definitiondef app():with gr.Blocks(title="Dynamic Menu with Preferences") as demo:# Radio button for selecting preferenceselected_preference = gr.Radio(choices=["All", "Vegan", "Halal", "Guilt-Free"],7 unmodified lines# Define interactivityselected_preference.change(filter_menu, inputs=[selected_preference], outputs=[menu_output])# Layoutgr.Markdown("## Dynamic Menu with Preferences")with gr.Row():selected_preference.render()menu_output.render()return demo# Run the app2 unmodified lines345678937 unmodified lines4748495051525354557 unmodified lines6364656667682 unmodified lines# Function to load the menu data from Exceldef load_menu():menu_file = "menu.xlsx" # Ensure this file exists in the same directorytry:return pd.read_excel(menu_file)except Exception as e:37 unmodified lines# Gradio app definitiondef app():with gr.Blocks(title="Dynamic Menu with Preferences") as demo:# Add a titlegr.Markdown("## Dynamic Menu with Preferences")# Radio button for selecting preferenceselected_preference = gr.Radio(choices=["All", "Vegan", "Halal", "Guilt-Free"],7 unmodified lines# Define interactivityselected_preference.change(filter_menu, inputs=[selected_preference], outputs=[menu_output])return demo# Run the app
app.py+4-7