Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,7 @@ def get_recipes(ingredients, max_calories=None, min_protein=None, max_fat=None,
|
|
62 |
if recipes:
|
63 |
# Format and return the list of recipes
|
64 |
return "\n".join(
|
65 |
-
[f
|
66 |
for recipe in recipes]
|
67 |
)
|
68 |
else:
|
@@ -85,7 +85,7 @@ interface = gr.Interface(
|
|
85 |
gr.Number(label="Maximum fat (g, optional)"),
|
86 |
gr.Number(label="Maximum carbs (g, optional)"),
|
87 |
],
|
88 |
-
outputs="
|
89 |
title="Estonian Recipe Search",
|
90 |
description="Enter ingredients in Estonian and set optional limits for calories, protein, fat, and carbs to find suitable recipes."
|
91 |
)
|
|
|
62 |
if recipes:
|
63 |
# Format and return the list of recipes
|
64 |
return "\n".join(
|
65 |
+
[f'<a href="https://spoonacular.com/recipes/{recipe["id"]}" target="_blank">{recipe["title"]}</a>'
|
66 |
for recipe in recipes]
|
67 |
)
|
68 |
else:
|
|
|
85 |
gr.Number(label="Maximum fat (g, optional)"),
|
86 |
gr.Number(label="Maximum carbs (g, optional)"),
|
87 |
],
|
88 |
+
outputs="html",
|
89 |
title="Estonian Recipe Search",
|
90 |
description="Enter ingredients in Estonian and set optional limits for calories, protein, fat, and carbs to find suitable recipes."
|
91 |
)
|