Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,32 +8,32 @@ import pandas as pd
|
|
| 8 |
# ====== 菜单数据结构(英文 + 编号) ======
|
| 9 |
MENU_DATA = {
|
| 10 |
"Appetizers": [
|
| 11 |
-
{"id": "A1", "name": "Spring Rolls", "desc": "Crispy rolls with vegetables", "price": 4.5
|
| 12 |
-
{"id": "A2", "name": "Dumplings", "desc": "Steamed pork dumplings", "price": 5.0
|
| 13 |
-
{"id": "A3", "name": "Salad", "desc": "Fresh vegetable salad", "price": 3.5
|
| 14 |
-
{"id": "A4", "name": "Tofu Skewers", "desc": "Grilled tofu with sauce", "price": 4.0
|
| 15 |
-
{"id": "A5", "name": "Edamame", "desc": "Boiled soybeans with salt", "price": 3.0
|
| 16 |
],
|
| 17 |
"Main Dishes": [
|
| 18 |
-
{"id": "B1", "name": "Beef Pho", "desc": "Traditional Vietnamese noodle soup", "price": 9.5
|
| 19 |
-
{"id": "B2", "name": "Chicken Curry", "desc": "Spicy chicken curry with rice", "price": 10.0
|
| 20 |
-
{"id": "B3", "name": "Fried Rice", "desc": "Fried rice with egg and vegetables", "price": 8.0
|
| 21 |
-
{"id": "B4", "name": "Grilled Fish", "desc": "Grilled fish with herbs", "price": 11.0
|
| 22 |
-
{"id": "B5", "name": "Veggie Stir Fry", "desc": "Mixed vegetables stir-fried with sauce", "price": 8.5
|
| 23 |
],
|
| 24 |
"Desserts": [
|
| 25 |
-
{"id": "C1", "name": "Mango Sticky Rice", "desc": "Sweet coconut rice with mango", "price": 5.0
|
| 26 |
-
{"id": "C2", "name": "Taro Cake", "desc": "Steamed taro cake", "price": 4.5
|
| 27 |
-
{"id": "C3", "name": "Coconut Jelly", "desc": "Chilled coconut milk jelly", "price": 4.0
|
| 28 |
-
{"id": "C4", "name": "Sweet Bean Soup", "desc": "Warm red bean dessert soup", "price": 3.5
|
| 29 |
-
{"id": "C5", "name": "Sesame Balls", "desc": "Fried sesame rice balls", "price": 3.5
|
| 30 |
],
|
| 31 |
"Drinks": [
|
| 32 |
-
{"id": "D1", "name": "Lime Soda", "desc": "Refreshing soda with lime", "price": 2.5
|
| 33 |
-
{"id": "D2", "name": "Iced Tea", "desc": "Chilled black tea with lemon", "price": 2.0
|
| 34 |
-
{"id": "D3", "name": "Coconut Water", "desc": "Natural coconut juice", "price": 3.0
|
| 35 |
-
{"id": "D4", "name": "Soy Milk", "desc": "Sweetened soy milk", "price": 2.0
|
| 36 |
-
{"id": "D5", "name": "Bottled Water", "desc": "Still mineral water", "price": 1.5
|
| 37 |
],
|
| 38 |
}
|
| 39 |
|
|
@@ -68,7 +68,7 @@ with gr.Blocks() as demo:
|
|
| 68 |
with gr.Tab(label=category):
|
| 69 |
for item in items:
|
| 70 |
with gr.Row():
|
| 71 |
-
gr.Image(value=
|
| 72 |
gr.Markdown(f"**{item['id']} - {item['name']}**\n\n{item['desc']}\n\n💰 €{item['price']:.2f}")
|
| 73 |
|
| 74 |
submit_btn = gr.Button("✅ I have made my selection")
|
|
|
|
| 8 |
# ====== 菜单数据结构(英文 + 编号) ======
|
| 9 |
MENU_DATA = {
|
| 10 |
"Appetizers": [
|
| 11 |
+
{"id": "A1", "name": "Spring Rolls", "desc": "Crispy rolls with vegetables", "price": 4.5},
|
| 12 |
+
{"id": "A2", "name": "Dumplings", "desc": "Steamed pork dumplings", "price": 5.0},
|
| 13 |
+
{"id": "A3", "name": "Salad", "desc": "Fresh vegetable salad", "price": 3.5},
|
| 14 |
+
{"id": "A4", "name": "Tofu Skewers", "desc": "Grilled tofu with sauce", "price": 4.0},
|
| 15 |
+
{"id": "A5", "name": "Edamame", "desc": "Boiled soybeans with salt", "price": 3.0},
|
| 16 |
],
|
| 17 |
"Main Dishes": [
|
| 18 |
+
{"id": "B1", "name": "Beef Pho", "desc": "Traditional Vietnamese noodle soup", "price": 9.5},
|
| 19 |
+
{"id": "B2", "name": "Chicken Curry", "desc": "Spicy chicken curry with rice", "price": 10.0},
|
| 20 |
+
{"id": "B3", "name": "Fried Rice", "desc": "Fried rice with egg and vegetables", "price": 8.0},
|
| 21 |
+
{"id": "B4", "name": "Grilled Fish", "desc": "Grilled fish with herbs", "price": 11.0},
|
| 22 |
+
{"id": "B5", "name": "Veggie Stir Fry", "desc": "Mixed vegetables stir-fried with sauce", "price": 8.5},
|
| 23 |
],
|
| 24 |
"Desserts": [
|
| 25 |
+
{"id": "C1", "name": "Mango Sticky Rice", "desc": "Sweet coconut rice with mango", "price": 5.0},
|
| 26 |
+
{"id": "C2", "name": "Taro Cake", "desc": "Steamed taro cake", "price": 4.5},
|
| 27 |
+
{"id": "C3", "name": "Coconut Jelly", "desc": "Chilled coconut milk jelly", "price": 4.0},
|
| 28 |
+
{"id": "C4", "name": "Sweet Bean Soup", "desc": "Warm red bean dessert soup", "price": 3.5},
|
| 29 |
+
{"id": "C5", "name": "Sesame Balls", "desc": "Fried sesame rice balls", "price": 3.5},
|
| 30 |
],
|
| 31 |
"Drinks": [
|
| 32 |
+
{"id": "D1", "name": "Lime Soda", "desc": "Refreshing soda with lime", "price": 2.5},
|
| 33 |
+
{"id": "D2", "name": "Iced Tea", "desc": "Chilled black tea with lemon", "price": 2.0},
|
| 34 |
+
{"id": "D3", "name": "Coconut Water", "desc": "Natural coconut juice", "price": 3.0},
|
| 35 |
+
{"id": "D4", "name": "Soy Milk", "desc": "Sweetened soy milk", "price": 2.0},
|
| 36 |
+
{"id": "D5", "name": "Bottled Water", "desc": "Still mineral water", "price": 1.5},
|
| 37 |
],
|
| 38 |
}
|
| 39 |
|
|
|
|
| 68 |
with gr.Tab(label=category):
|
| 69 |
for item in items:
|
| 70 |
with gr.Row():
|
| 71 |
+
gr.Image(value="user_avatar.jpg", width=100, height=100, show_label=False, interactive=False)
|
| 72 |
gr.Markdown(f"**{item['id']} - {item['name']}**\n\n{item['desc']}\n\n💰 €{item['price']:.2f}")
|
| 73 |
|
| 74 |
submit_btn = gr.Button("✅ I have made my selection")
|