nagasurendra commited on
Commit
2ca89fc
·
verified ·
1 Parent(s): 5d79253

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -13
app.py CHANGED
@@ -131,19 +131,18 @@ def process_command(command):
131
  command = command.lower()
132
 
133
  # Handle menu preferences
134
- if menu_preferences == "all":
135
- if "non-vegetarian" in command:
136
- menu_preferences = "non-vegetarian"
137
- return "You have chosen the Non-Vegetarian menu. To view the menu, say 'menu'."
138
- elif "vegetarian" in command and "non-vegetarian" not in command:
139
- menu_preferences = "vegetarian"
140
- return "You have chosen the Vegetarian menu. To view the menu, say 'menu'."
141
- elif "guilt-free" in command:
142
- menu_preferences = "guilt-free"
143
- return "You have chosen the Guilt-Free menu. To view the menu, say 'menu'."
144
- elif "all" in command:
145
- menu_preferences = "all"
146
- return "You have chosen the complete menu. To view the menu, say 'menu'."
147
 
148
  # Split command into potential action and item
149
  words = command.split()
 
131
  command = command.lower()
132
 
133
  # Handle menu preferences
134
+ if "non-vegetarian" in command:
135
+ menu_preferences = "non-vegetarian"
136
+ return "You have chosen the Non-Vegetarian menu. To view the menu, say 'menu'."
137
+ elif "vegetarian" in command and "non-vegetarian" not in command:
138
+ menu_preferences = "vegetarian"
139
+ return "You have chosen the Vegetarian menu. To view the menu, say 'menu'."
140
+ elif "guilt-free" in command:
141
+ menu_preferences = "guilt-free"
142
+ return "You have chosen the Guilt-Free menu. To view the menu, say 'menu'."
143
+ elif "all" in command:
144
+ menu_preferences = "all"
145
+ return "You have chosen the complete menu. To view the menu, say 'menu'."
 
146
 
147
  # Split command into potential action and item
148
  words = command.split()