irins commited on
Commit
0195055
·
verified ·
1 Parent(s): 1314ff5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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"Recipe: {recipe['title']} (Link: https://spoonacular.com/recipes/{recipe['id']})"
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="text",
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
  )