Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,10 +26,10 @@ def get_calories(meal:str) -> Union[str, None]:
|
|
| 26 |
Retrieves the calorie information for a given meal from the OpenFoodFacts API.
|
| 27 |
|
| 28 |
Args:
|
| 29 |
-
meal
|
| 30 |
|
| 31 |
Returns:
|
| 32 |
-
Union
|
| 33 |
'No data found' if no information is available, or None if the request fails.
|
| 34 |
"""
|
| 35 |
search_url = "https://world.openfoodfacts.org/cgi/search.pl"
|
|
|
|
| 26 |
Retrieves the calorie information for a given meal from the OpenFoodFacts API.
|
| 27 |
|
| 28 |
Args:
|
| 29 |
+
meal: The argument that describes the name or description of the meal to search for.
|
| 30 |
|
| 31 |
Returns:
|
| 32 |
+
Union: The calorie information as a string in the format 'X kcal per 100g',
|
| 33 |
'No data found' if no information is available, or None if the request fails.
|
| 34 |
"""
|
| 35 |
search_url = "https://world.openfoodfacts.org/cgi/search.pl"
|