fahrnphi commited on
Commit
0df3c00
·
verified ·
1 Parent(s): 9091552

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -78,9 +78,11 @@ if st.button("Finish"):
78
  def find_recipes(ingredients):
79
  # This is a mock function, replace with actual recipe finding logic
80
  sample_recipes = [
81
- {"name": "Vegetable Stir Fry", "ingredients": ["Peperoni", "Carrot", "Onion"]},
82
- {"name": "Tomato Garlic Pasta", "ingredients": ["Tomato", "Garlic"]},
83
- {"name": "Ginger Potato Soup", "ingredients": ["Ginger", "Potato"]}
 
 
84
  ]
85
  matching_recipes = [recipe for recipe in sample_recipes if all(item in recipe["ingredients"] for item in ingredients)]
86
  return matching_recipes
@@ -92,6 +94,8 @@ if st.button("Finish"):
92
  for recipe in matching_recipes:
93
  st.write(f"**{recipe['name']}**")
94
  st.write(", ".join(recipe["ingredients"]))
 
 
95
  else:
96
  st.write("No matching recipes found.")
97
 
 
78
  def find_recipes(ingredients):
79
  # This is a mock function, replace with actual recipe finding logic
80
  sample_recipes = [
81
+ {"name": "Vegetable Stir Fry", "ingredients": ["Peperoni", "Carrot", "Onion"], "instructions": "Stir fry the vegetables."},
82
+ {"name": "Tomato Garlic Pasta", "ingredients": ["Tomato", "Garlic"], "instructions": "Cook pasta with tomato and garlic."},
83
+ {"name": "Ginger Potato Soup", "ingredients": ["Ginger", "Potato"], "instructions": "Boil potatoes and ginger for soup."},
84
+ {"name": "Jalapeno Onion Salad", "ingredients": ["Jalapeno", "Onion"], "instructions": "Mix jalapeno and onion for a spicy salad."},
85
+ {"name": "Sweetpotato Carrot Soup", "ingredients": ["Sweetpotato", "Carrot"], "instructions": "Cook sweetpotato and carrot for a healthy soup."}
86
  ]
87
  matching_recipes = [recipe for recipe in sample_recipes if all(item in recipe["ingredients"] for item in ingredients)]
88
  return matching_recipes
 
94
  for recipe in matching_recipes:
95
  st.write(f"**{recipe['name']}**")
96
  st.write(", ".join(recipe["ingredients"]))
97
+ st.write(f"Instructions: {recipe['instructions']}")
98
+
99
  else:
100
  st.write("No matching recipes found.")
101