Spaces:
Running
Running
| from llm_api import connect | |
| def generate(age, gender,current_weight, desired_weight, goal, restrictions, preferences): | |
| # Create a prompt incorporating safety guidelines | |
| prompt = f"""Generate a 7-day meal plan that is safe, healthy, and inclusive for a {age}-year-old {gender} who weighs {current_weight} kgs and wants to {goal} and desired weight is {desired_weight}. | |
| **Dietary Restrictions:** | |
| {restrictions} | |
| **Food Preferences:** | |
| {preferences} | |
| Also provide macros for each meal and quantity | |
| **Additional Considerations:** | |
| - Prioritize nutrient-dense, wholesome foods. | |
| - Offer flexible meal options for diverse dietary needs. | |
| - Provide clear instructions, cooking times, and allergy warnings. | |
| - Include a grocery list with quantities of ingredients. | |
| - Suggest tips for safe food handling, preparation, and storage. | |
| """ | |
| # Call your API or logic to generate the meal plan based on the prompt | |
| meal_plan = connect.generate_content(prompt) | |
| return meal_plan | |