import gradio as gr import pandas as pd # Simulated menu data menu_data = [ {"name": "Samosa", "price": 10, "description": "Crispy fried pastry filled with spiced potatoes and peas. Serves 1. [Energy: 200 kcal, Protein: 5g, Carbohydrates: 25g, Fiber: 3g, Fat: 10g, Sugar: 1g]", "image": "images/samosa.jpg"}, {"name": "Onion Pakoda", "price": 14, "description": "Deep-fried onion fritters seasoned with herbs and spices. Serves 2. [Energy: 250 kcal, Protein: 6g, Carbohydrates: 30g, Fiber: 4g, Fat: 12g, Sugar: 2g]", "image": "images/onion-pakoda.jpg"}, {"name": "Paneer Tikka", "price": 15, "description": "Grilled paneer cubes marinated in spices. Serves 1. [Energy: 300 kcal, Protein: 15g, Carbohydrates: 10g, Fiber: 2g, Fat: 20g, Sugar: 1g]", "image": "images/paneer-tikka.jpg"}, {"name": "Veg Biryani", "price": 12, "description": "Aromatic rice cooked with vegetables and spices. Serves 1. [Energy: 350 kcal, Protein: 8g, Carbohydrates: 50g, Fiber: 5g, Fat: 12g, Sugar: 2g]", "image": "images/veg-biryani.jpg"}, {"name": "Chicken Curry", "price": 16, "description": "Tender chicken pieces cooked in a spicy curry. Serves 1. [Energy: 400 kcal, Protein: 25g, Carbohydrates: 10g, Fiber: 2g, Fat: 25g, Sugar: 3g]", "image": "images/chicken-curry.jpg"}, {"name": "Masala Dosa", "price": 10, "description": "Thin rice crepe stuffed with spiced potato filling. Serves 1. [Energy: 300 kcal, Protein: 6g, Carbohydrates: 45g, Fiber: 4g, Fat: 8g, Sugar: 1g]", "image": "images/masala-dosa.jpg"} ] cart = [] def display_menu(): """ Function to display the menu in a formatted style with an 'Add' button for each item. """ menu_html = "" for item in menu_data: menu_html += f"""
{item['description']}