Spaces:
Runtime error
Runtime error
Commit
·
9efab44
1
Parent(s):
9a79088
Update app.py
Browse files
app.py
CHANGED
@@ -128,13 +128,11 @@ def main(audio):
|
|
128 |
|
129 |
print(found_item , found_rest)
|
130 |
if food_command in ['order', 'eat' , 'want' , 'serve' , 'prepare' ]:
|
131 |
-
|
132 |
-
if not found_rest and found_item:
|
133 |
-
print("entered 2")
|
134 |
temp_val = {}
|
135 |
for restaurant, rest_info in restaurants.items():
|
136 |
if item_name in rest_info:
|
137 |
-
temp_val[restaurant] =
|
138 |
print(temp_val)
|
139 |
if temp_val:
|
140 |
min_price = min(temp_val.values())
|
@@ -162,7 +160,7 @@ def main(audio):
|
|
162 |
response = "Sorry, you didn't provide any valid input. Goodbye!"
|
163 |
break
|
164 |
else:
|
165 |
-
|
166 |
else :
|
167 |
resp = "Respond properly and Try to make the Customer buy some food and for the valid response"
|
168 |
response = chatbot(resp)
|
@@ -170,7 +168,7 @@ def main(audio):
|
|
170 |
|
171 |
elif food_command in ['menu' , 'menus' , 'catalogue' , 'items' , 'something']:
|
172 |
if found_rest:
|
173 |
-
for
|
174 |
if restaurant in command:
|
175 |
menu_items = get_menu_items(restaurant)
|
176 |
response = f"Here's the menu for {restaurant}: {menu_items}"
|
|
|
128 |
|
129 |
print(found_item , found_rest)
|
130 |
if food_command in ['order', 'eat' , 'want' , 'serve' , 'prepare' ]:
|
131 |
+
if not found_rest and found_item:
|
|
|
|
|
132 |
temp_val = {}
|
133 |
for restaurant, rest_info in restaurants.items():
|
134 |
if item_name in rest_info:
|
135 |
+
temp_val[restaurant] = rest_info[item_name]
|
136 |
print(temp_val)
|
137 |
if temp_val:
|
138 |
min_price = min(temp_val.values())
|
|
|
160 |
response = "Sorry, you didn't provide any valid input. Goodbye!"
|
161 |
break
|
162 |
else:
|
163 |
+
response = "Sorry, that item is not available at this restaurant. Please try again."
|
164 |
else :
|
165 |
resp = "Respond properly and Try to make the Customer buy some food and for the valid response"
|
166 |
response = chatbot(resp)
|
|
|
168 |
|
169 |
elif food_command in ['menu' , 'menus' , 'catalogue' , 'items' , 'something']:
|
170 |
if found_rest:
|
171 |
+
for restaurant_name in restaurants:
|
172 |
if restaurant in command:
|
173 |
menu_items = get_menu_items(restaurant)
|
174 |
response = f"Here's the menu for {restaurant}: {menu_items}"
|