Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,34 @@ import pandas as pd
|
|
| 8 |
# ====== ่ๅๆฐๆฎ็ปๆ๏ผ่ฑๆ + ็ผๅท + ๆ่ฟฐ๏ผ ======
|
| 9 |
MENU_DATA = {
|
| 10 |
"Appetizers": [
|
| 11 |
-
{"id": "A1", "name": "Spring Rolls", "desc": "Crispy rolls with vegetables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
{"id": "A2", "name": "Dumplings", "desc": "Steamed dumplings filled with seasoned pork and chives. Juicy and savory.", "price": 5.0},
|
| 13 |
{"id": "A3", "name": "Salad", "desc": "Fresh garden salad with lettuce, tomatoes, and vinaigrette dressing.", "price": 3.5},
|
| 14 |
{"id": "A4", "name": "Tofu Skewers", "desc": "Grilled tofu skewers marinated with sesame and soy sauce.", "price": 4.0},
|
|
@@ -60,7 +87,7 @@ with gr.Blocks() as demo:
|
|
| 60 |
with gr.Tab(label=category):
|
| 61 |
for item in items:
|
| 62 |
with gr.Row():
|
| 63 |
-
gr.Image(value=get_image(), width=100, height=100)
|
| 64 |
gr.Markdown(f"**{item['id']} - {item['name']}**\n\n{item['desc']}\n\n๐ฐ โฌ{item['price']:.2f}")
|
| 65 |
|
| 66 |
submit_btn = gr.Button("โ
I have made my selection")
|
|
@@ -73,4 +100,4 @@ with gr.Blocks() as demo:
|
|
| 73 |
|
| 74 |
# ๅฏๅจ
|
| 75 |
if __name__ == "__main__":
|
| 76 |
-
demo.launch()
|
|
|
|
| 8 |
# ====== ่ๅๆฐๆฎ็ปๆ๏ผ่ฑๆ + ็ผๅท + ๆ่ฟฐ๏ผ ======
|
| 9 |
MENU_DATA = {
|
| 10 |
"Appetizers": [
|
| 11 |
+
{"id": "A1", "name": "Spring Rolls", "desc": "(Cabbage, carrot, glass noodles) โ Crispy rolls with vegetables. Light and crunchy.", "price": 4.5},
|
| 12 |
+
{"id": "A2", "name": "Dumplings", "desc": "(Pork, chives, soy sauce) โ Steamed dumplings with savory filling.", "price": 5.0},
|
| 13 |
+
{"id": "A3", "name": "Salad", "desc": "(Lettuce, tomato, cucumber) โ Fresh garden salad with vinaigrette.", "price": 3.5},
|
| 14 |
+
{"id": "A4", "name": "Tofu Skewers", "desc": "(Tofu, sesame, chili) โ Grilled tofu with sweet soy glaze.", "price": 4.0},
|
| 15 |
+
{"id": "A5", "name": "Edamame", "desc": "(Soybeans, salt) โ Boiled soybeans. A healthy starter.", "price": 3.0}
|
| 16 |
+
],
|
| 17 |
+
"Main Dishes": [
|
| 18 |
+
{"id": "B1", "name": "Beef Pho", "desc": "(Beef, rice noodles, herbs) โ Vietnamese soup with rich broth.", "price": 9.5},
|
| 19 |
+
{"id": "B2", "name": "Chicken Curry", "desc": "(Chicken, coconut milk, vegetables) โ Spicy curry with rice.", "price": 10.0},
|
| 20 |
+
{"id": "B3", "name": "Fried Rice", "desc": "(Rice, egg, peas, carrots) โ Classic fried rice in soy sauce.", "price": 8.0},
|
| 21 |
+
{"id": "B4", "name": "Grilled Fish", "desc": "(White fish, lemongrass, garlic) โ Smoky and herbed fillet.", "price": 11.0},
|
| 22 |
+
{"id": "B5", "name": "Veggie Stir Fry", "desc": "(Broccoli, bell pepper, mushroom) โ Mixed vegetables in garlic sauce.", "price": 8.5}
|
| 23 |
+
],
|
| 24 |
+
"Desserts": [
|
| 25 |
+
{"id": "C1", "name": "Mango Sticky Rice", "desc": "(Mango, coconut milk, sticky rice) โ Sweet tropical Thai dessert.", "price": 5.0},
|
| 26 |
+
{"id": "C2", "name": "Taro Cake", "desc": "(Taro, rice flour, sugar) โ Soft steamed purple taro cake.", "price": 4.5},
|
| 27 |
+
{"id": "C3", "name": "Coconut Jelly", "desc": "(Coconut milk, gelatin, sugar) โ Chilled and silky treat.", "price": 4.0},
|
| 28 |
+
{"id": "C4", "name": "Sweet Bean Soup", "desc": "(Red beans, citrus zest) โ Warm dessert soup with a twist.", "price": 3.5},
|
| 29 |
+
{"id": "C5", "name": "Sesame Balls", "desc": "(Glutinous rice, sesame paste) โ Fried golden and gooey.", "price": 3.5}
|
| 30 |
+
],
|
| 31 |
+
"Drinks": [
|
| 32 |
+
{"id": "D1", "name": "Lime Soda", "desc": "(Soda, lime juice) โ Zesty and refreshing cooler.", "price": 2.5},
|
| 33 |
+
{"id": "D2", "name": "Iced Tea", "desc": "(Black tea, lemon, sugar) โ Cold brew with a citrus hint.", "price": 2.0},
|
| 34 |
+
{"id": "D3", "name": "Coconut Water", "desc": "(Young coconut) โ Natural and hydrating.", "price": 3.0},
|
| 35 |
+
{"id": "D4", "name": "Soy Milk", "desc": "(Soybeans, sugar) โ Sweetened and smooth.", "price": 2.0},
|
| 36 |
+
{"id": "D5", "name": "Bottled Water", "desc": "(Mineral water) โ Sealed and clean.", "price": 1.5}
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
{"id": "A2", "name": "Dumplings", "desc": "Steamed dumplings filled with seasoned pork and chives. Juicy and savory.", "price": 5.0},
|
| 40 |
{"id": "A3", "name": "Salad", "desc": "Fresh garden salad with lettuce, tomatoes, and vinaigrette dressing.", "price": 3.5},
|
| 41 |
{"id": "A4", "name": "Tofu Skewers", "desc": "Grilled tofu skewers marinated with sesame and soy sauce.", "price": 4.0},
|
|
|
|
| 87 |
with gr.Tab(label=category):
|
| 88 |
for item in items:
|
| 89 |
with gr.Row():
|
| 90 |
+
gr.Image(value=get_image(), width=100, height=100, show_label=False, container=False)
|
| 91 |
gr.Markdown(f"**{item['id']} - {item['name']}**\n\n{item['desc']}\n\n๐ฐ โฌ{item['price']:.2f}")
|
| 92 |
|
| 93 |
submit_btn = gr.Button("โ
I have made my selection")
|
|
|
|
| 100 |
|
| 101 |
# ๅฏๅจ
|
| 102 |
if __name__ == "__main__":
|
| 103 |
+
demo.launch(show_api=False)
|