Spaces:
Sleeping
Sleeping
Update app.py
Browse files123456710 unmodified lines1819202122232425262728293031323334353637import gradio as gr# Global variables for cart and menu datacart = []menu_data = [{"name": "Veg Burger", "category": "VEGAN",10 unmodified lines"price": "$10.99"}]# Function to add an item to the cartdef add_to_cart(item_name):cart.append({"item_name": item_name})return f"{item_name} added to cart!"# Function to display the current cartdef display_cart():if not cart:return "Your cart is empty."cart_content = "<h3>Your Cart:</h3><ul>"for item in cart:cart_content += f"<li>{item['item_name']}</li>"cart_content += "</ul>"return cart_content# Function to generate dish cardsdef display_dishes(category):1234510 unmodified lines16171819202122import gradio as grfrom cart_tab import add_to_cart, display_cart # Import shared cart functionsmenu_data = [{"name": "Veg Burger", "category": "VEGAN",10 unmodified lines"price": "$10.99"}]# Function to generate dish cardsdef display_dishes(category):
app.py+1-16