Update app.py
Browse files
app.py
CHANGED
|
@@ -247,7 +247,7 @@ def process_command(command):
|
|
| 247 |
command = command.lower()
|
| 248 |
|
| 249 |
# Show the menu without categorizing the items
|
| 250 |
-
if "
|
| 251 |
menu_response = (
|
| 252 |
"Here are the available options: \n"
|
| 253 |
"Vegetable Biryani\n"
|
|
@@ -279,7 +279,7 @@ def process_command(command):
|
|
| 279 |
return f"{item_to_remove} is not in your order. Please specify an item that is already in your order."
|
| 280 |
|
| 281 |
# Show current order
|
| 282 |
-
elif "show my order" in command or "what's my order" in command:
|
| 283 |
if user_order:
|
| 284 |
return "Your current order includes: " + ", ".join(user_order)
|
| 285 |
else:
|
|
@@ -293,7 +293,7 @@ def process_command(command):
|
|
| 293 |
return "You haven't added anything to your order yet. Please add some items first."
|
| 294 |
|
| 295 |
# Final confirmation (user says yes to confirm the order)
|
| 296 |
-
elif "yes" in command or "place order" in command:
|
| 297 |
if user_order:
|
| 298 |
return "Your order has been confirmed and sent to the kitchen. Thank you for ordering!"
|
| 299 |
else:
|
|
@@ -301,12 +301,7 @@ def process_command(command):
|
|
| 301 |
|
| 302 |
# Handle unrecognized commands
|
| 303 |
return (
|
| 304 |
-
"Sorry,
|
| 305 |
-
"- Show me the menu\n"
|
| 306 |
-
"- Add [item] to my order\n"
|
| 307 |
-
"- Remove [item] from my order\n"
|
| 308 |
-
"- Show my order\n"
|
| 309 |
-
"- Place the order"
|
| 310 |
)
|
| 311 |
|
| 312 |
|
|
|
|
| 247 |
command = command.lower()
|
| 248 |
|
| 249 |
# Show the menu without categorizing the items
|
| 250 |
+
if "menu" in command or "what’s the menu" in command or "Show me the menu" in command:
|
| 251 |
menu_response = (
|
| 252 |
"Here are the available options: \n"
|
| 253 |
"Vegetable Biryani\n"
|
|
|
|
| 279 |
return f"{item_to_remove} is not in your order. Please specify an item that is already in your order."
|
| 280 |
|
| 281 |
# Show current order
|
| 282 |
+
elif "show my order" in command or "what's my order" in command or "what's in my order" in command:
|
| 283 |
if user_order:
|
| 284 |
return "Your current order includes: " + ", ".join(user_order)
|
| 285 |
else:
|
|
|
|
| 293 |
return "You haven't added anything to your order yet. Please add some items first."
|
| 294 |
|
| 295 |
# Final confirmation (user says yes to confirm the order)
|
| 296 |
+
elif "yes" in command or "place order" in command or "Check order" in command:
|
| 297 |
if user_order:
|
| 298 |
return "Your order has been confirmed and sent to the kitchen. Thank you for ordering!"
|
| 299 |
else:
|
|
|
|
| 301 |
|
| 302 |
# Handle unrecognized commands
|
| 303 |
return (
|
| 304 |
+
"Sorry, try again"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 305 |
)
|
| 306 |
|
| 307 |
|