# app.py import gradio as gr # Data for the menu menu = [ { "name": "Roti", "image": "https://via.placeholder.com/150?text=Roti", "nutrition": "Calories: 70 | Protein: 2g | Carbs: 15g" }, { "name": "Paneer Butter Masala", "image": "https://via.placeholder.com/150?text=Paneer+Butter+Masala", "nutrition": "Calories: 450 | Protein: 15g | Carbs: 20g | Fat: 35g" }, { "name": "Chicken Curry", "image": "https://via.placeholder.com/150?text=Chicken+Curry", "nutrition": "Calories: 300 | Protein: 25g | Carbs: 5g | Fat: 20g" }, { "name": "Vegetable Biryani", "image": "https://via.placeholder.com/150?text=Vegetable+Biryani", "nutrition": "Calories: 250 | Protein: 5g | Carbs: 45g | Fat: 5g" }, ] def display_menu(): """Generate HTML for menu items with hover effects.""" html_content = """
""" for item in menu: html_content += f""" """ html_content += "
" return html_content with gr.Blocks() as demo: gr.Markdown("# Welcome to Our Food Menu") gr.Markdown(display_menu(), elem_id="menu-display") # Removed interactive=False demo.launch()