Spaces:
Sleeping
Sleeping
File size: 770 Bytes
dd8f7ab a7e88c2 dd8f7ab a7e88c2 dd8f7ab a7e88c2 dd8f7ab a7e88c2 dd8f7ab a7e88c2 dd8f7ab a7e88c2 dd8f7ab | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | def build_diet_prompt(name, gender, age, height, weight, goal):
bmi = weight / ((height / 100) ** 2)
# Custom instructions based on Goal
if goal == "Weight Loss":
diet_type = "Low carb, high protein, 500 calorie deficit"
elif goal == "Build Muscle":
diet_type = "High carb, high protein, 300 calorie surplus"
else:
diet_type = "Balanced macros, maintenance calories"
prompt = f"""
Act as a professional nutritionist for {name} ({gender}, {age}yo).
Stats: BMI {bmi:.1f}, Goal: {goal}, Strategy: {diet_type}.
STRICT FORMAT (One meal per line):
Meal Name | Time | Ingredients | Calories
Provide 4 unique meals. Use the | separator exactly. No conversational text.
"""
return prompt |