Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,17 +14,13 @@ from Gradio_UI import GradioUI
|
|
| 14 |
|
| 15 |
@tool
|
| 16 |
def extract_recipe_details(url: str) -> Dict[str, Any]:
|
| 17 |
-
"""
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
Returns:
|
| 24 |
-
|
| 25 |
-
- ingredients: List of recipe ingredients
|
| 26 |
-
- instructions: List of recipe preparation steps
|
| 27 |
-
- nutritional_benefits: String containing nutritional information
|
| 28 |
"""
|
| 29 |
try:
|
| 30 |
headers = {"User-Agent": "Mozilla/5.0"}
|
|
@@ -81,14 +77,13 @@ def extract_recipe_details(url: str) -> Dict[str, Any]:
|
|
| 81 |
|
| 82 |
@tool
|
| 83 |
def get_healthy_cheat_meal(diet_type: str) -> List[Dict[str, Any]]:
|
| 84 |
-
"""
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
Returns:
|
| 91 |
-
|
| 92 |
"""
|
| 93 |
query = f"healthy {diet_type} sweet dish recipe with ingredients, instructions, and nutrition facts"
|
| 94 |
|
|
|
|
| 14 |
|
| 15 |
@tool
|
| 16 |
def extract_recipe_details(url: str) -> Dict[str, Any]:
|
| 17 |
+
"""Extract recipe details including ingredients, instructions, and nutrition from a webpage.
|
| 18 |
+
|
| 19 |
+
url:
|
| 20 |
+
The complete URL of the recipe webpage to scrape.
|
| 21 |
+
|
|
|
|
| 22 |
Returns:
|
| 23 |
+
A dictionary containing ingredients list, cooking instructions, and nutritional information.
|
|
|
|
|
|
|
|
|
|
| 24 |
"""
|
| 25 |
try:
|
| 26 |
headers = {"User-Agent": "Mozilla/5.0"}
|
|
|
|
| 77 |
|
| 78 |
@tool
|
| 79 |
def get_healthy_cheat_meal(diet_type: str) -> List[Dict[str, Any]]:
|
| 80 |
+
"""Search and extract healthy sweet dish recipes based on diet type.
|
| 81 |
+
|
| 82 |
+
diet_type:
|
| 83 |
+
The specific diet category (e.g., Keto, Paleo, Vegan, Vegetarian, Non-Vegetarian).
|
| 84 |
+
|
|
|
|
| 85 |
Returns:
|
| 86 |
+
A list of recipe dictionaries containing recipe details and instructions.
|
| 87 |
"""
|
| 88 |
query = f"healthy {diet_type} sweet dish recipe with ingredients, instructions, and nutrition facts"
|
| 89 |
|