nagasurendra commited on
Commit
69a28fe
·
verified ·
1 Parent(s): 6781fd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -169,12 +169,12 @@ def process_command(command):
169
  if closest_match and closest_match[1] > 70:
170
  matched_item = closest_match[0]
171
  cart[matched_item] = cart.get(matched_item, 0) + 1
172
- return f"{matched_item.capitalize()} added to your cart. Current cart: {dict(cart)}."
173
  return "Sorry, I couldn't recognize the item. Could you try again?"
174
  elif "final order" in command:
175
  if cart:
176
  total = sum(prices[item] * count for item, count in cart.items())
177
- response = f"Your final order is: {', '.join(f'{item} x{count}' for item, count in cart.items())}. Your total bill is ${total}. Thank you for ordering!"
178
  cart.clear()
179
  return response
180
  return "Your cart is empty. Please add items to your cart first."
 
169
  if closest_match and closest_match[1] > 70:
170
  matched_item = closest_match[0]
171
  cart[matched_item] = cart.get(matched_item, 0) + 1
172
+ return f"{matched_item.capitalize()} added to your cart. Current cart: {dict(cart)}. To finalize say final order"
173
  return "Sorry, I couldn't recognize the item. Could you try again?"
174
  elif "final order" in command:
175
  if cart:
176
  total = sum(prices[item] * count for item, count in cart.items())
177
+ response = f"Your final order is: {', '.join(f'{item} x{count}' for item, count in cart.items())}. Your total bill is ${total}. Thank you for ordering! To exist this conversation say nothing or good bye!"
178
  cart.clear()
179
  return response
180
  return "Your cart is empty. Please add items to your cart first."