geethareddy commited on
Commit
212c51e
·
verified ·
1 Parent(s): 08cfbb2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -14,12 +14,13 @@ 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_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
- return f"{item.capitalize()} added to your cart. Your current total is ₹{total}."
 
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])