Spaces:
Build error
Build error
| # Recipe suggestions module | |
| def get_recipe_suggestion(ingredients): | |
| ingredient_list = ingredients.split(",") | |
| # Here, you would ideally load a more complex model or recipe database. | |
| recipes = { | |
| "rice, milk, jaggery": "Kheer (Indian Rice Pudding)", | |
| "tomato, onion, garlic, rice": "Tomato Rice", | |
| "flour, sugar, butter": "Cookies" | |
| } | |
| # Search for a match in the recipe dictionary | |
| for key, dish in recipes.items(): | |
| if all(ingredient.strip().lower() in ingredients.lower() for ingredient in key.split(',')): | |
| return f"Suggested Dish: {dish}" | |
| return "No dish found for these ingredients. Please try again!" | |