shivanis14
commited on
Commit
•
749cf15
1
Parent(s):
8e423d7
Update app.py
Browse files
app.py
CHANGED
@@ -120,7 +120,8 @@ def find_product_nutrients(product_info_from_db):
|
|
120 |
elif product_info_from_db["servingSize"]["unit"] == "ml":
|
121 |
product_type = "liquid"
|
122 |
serving_size = product_info_from_db["servingSize"]["quantity"]
|
123 |
-
|
|
|
124 |
if 'energy' in item['name'].lower():
|
125 |
calories = item['values'][0]['value']
|
126 |
if 'total sugar' in item['name'].lower():
|
|
|
120 |
elif product_info_from_db["servingSize"]["unit"] == "ml":
|
121 |
product_type = "liquid"
|
122 |
serving_size = product_info_from_db["servingSize"]["quantity"]
|
123 |
+
|
124 |
+
for item in product_info_from_db["nutritionalInformation"]:
|
125 |
if 'energy' in item['name'].lower():
|
126 |
calories = item['values'][0]['value']
|
127 |
if 'total sugar' in item['name'].lower():
|