Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,12 +14,13 @@ cart = []
|
|
| 14 |
|
| 15 |
# Menu with items and their prices
|
| 16 |
MENU = {
|
| 17 |
-
"
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
-
"
|
| 21 |
}
|
| 22 |
|
|
|
|
| 23 |
html_code = """
|
| 24 |
<!DOCTYPE html>
|
| 25 |
<html lang="en">
|
|
@@ -169,7 +170,8 @@ def process_command(command):
|
|
| 169 |
if item:
|
| 170 |
cart.append((item, all_items[item]))
|
| 171 |
total = sum(item[1] for item in cart)
|
| 172 |
-
|
|
|
|
| 173 |
elif "final order" in command or "submit" in command:
|
| 174 |
if cart:
|
| 175 |
items = ", ".join([f"{item[0]} (₹{item[1]})" for item in cart])
|
|
|
|
| 14 |
|
| 15 |
# Menu with items and their prices
|
| 16 |
MENU = {
|
| 17 |
+
"Biryani": {"Chicken Biryani": 150, "Veg Biryani": 120},
|
| 18 |
+
"Starters": {"Chicken Wings": 180, "Paneer Tikka": 160},
|
| 19 |
+
"Breads": {"Butter Naan": 40, "Roti": 30},
|
| 20 |
+
"Curries": {"Butter Chicken": 200, "Dal Fry": 150},
|
| 21 |
}
|
| 22 |
|
| 23 |
+
# HTML Template for Frontend
|
| 24 |
html_code = """
|
| 25 |
<!DOCTYPE html>
|
| 26 |
<html lang="en">
|
|
|
|
| 170 |
if item:
|
| 171 |
cart.append((item, all_items[item]))
|
| 172 |
total = sum(item[1] for item in cart)
|
| 173 |
+
cart_summary = ", ".join([f"{i[0]} (₹{i[1]})" for i in cart])
|
| 174 |
+
return f"{item.capitalize()} added to your cart. Your cart: {cart_summary}. Total: ₹{total}."
|
| 175 |
elif "final order" in command or "submit" in command:
|
| 176 |
if cart:
|
| 177 |
items = ", ".join([f"{item[0]} (₹{item[1]})" for item in cart])
|