Spaces:
Sleeping
Sleeping
include ingredients
Browse files
app.py
CHANGED
@@ -39,9 +39,11 @@ def get_recipe_details(selected_title):
|
|
39 |
title = data.get("title", "Unknown Title")
|
40 |
time = data.get("readyInMinutes", "N/A")
|
41 |
instructions = data.get("instructions") or "No instructions available."
|
|
|
|
|
42 |
|
43 |
return f"### 🍽️ {title}\n**⏱️ Cook Time:** {time} minutes\n\n**📋 Instructions:**\n{instructions}"
|
44 |
-
|
45 |
# Handle chatbot questions
|
46 |
def ask_recipe_bot(message, history):
|
47 |
# Try to find a recipe ID from previous dropdown results
|
|
|
39 |
title = data.get("title", "Unknown Title")
|
40 |
time = data.get("readyInMinutes", "N/A")
|
41 |
instructions = data.get("instructions") or "No instructions available."
|
42 |
+
ingredients_list = data.get("extendedIngredients", [])
|
43 |
+
ingredients = "\n".join([f"- {item.get('original')}" for item in ingredients_list])
|
44 |
|
45 |
return f"### 🍽️ {title}\n**⏱️ Cook Time:** {time} minutes\n\n**📋 Instructions:**\n{instructions}"
|
46 |
+
gr.Markdown("💬 Go to the next tab to ask our chatbot your questions on the recipe!")
|
47 |
# Handle chatbot questions
|
48 |
def ask_recipe_bot(message, history):
|
49 |
# Try to find a recipe ID from previous dropdown results
|