Spaces:
Running
Running
Update prompt_builder.py
Browse files- prompt_builder.py +8 -14
prompt_builder.py
CHANGED
|
@@ -18,20 +18,14 @@ def build_prompt(name, gender, age, height, weight, goal, fitness_level, equipme
|
|
| 18 |
equipment_list = ", ".join(equipment) if equipment else "No Equipment"
|
| 19 |
|
| 20 |
prompt = f"""You are a professional trainer. Create a 5-day plan for {name}.
|
| 21 |
-
User Profile:
|
| 22 |
-
- Age: {age} years old
|
| 23 |
-
- Gender: {gender}
|
| 24 |
-
- BMI: {bmi:.2f} ({bmi_status})
|
| 25 |
-
- Goal: {goal}
|
| 26 |
-
- Level: {fitness_level}
|
| 27 |
-
- Equipment: {equipment_list}
|
| 28 |
|
| 29 |
-
|
| 30 |
-
1. Label days
|
| 31 |
-
2.
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
|
| 37 |
return prompt, bmi, bmi_status, status_color
|
|
|
|
| 18 |
equipment_list = ", ".join(equipment) if equipment else "No Equipment"
|
| 19 |
|
| 20 |
prompt = f"""You are a professional trainer. Create a 5-day plan for {name}.
|
| 21 |
+
User Profile: Age {age}, Gender {gender}, BMI {bmi:.2f}, Goal {goal}, Level {fitness_level}, Equipment {equipment_list}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
STRICT FORMATTING RULES:
|
| 24 |
+
1. Label days as Day 1:, Day 2:, etc.
|
| 25 |
+
2. For EVERY exercise, use this EXACT format:
|
| 26 |
+
- Exercise Name | Sets | Reps | Rest
|
| 27 |
+
3. Example: - Dumbbell Bench Press | 3 | 10-12 | 60s
|
| 28 |
+
4. Day 3 must be "Rest Day".
|
| 29 |
+
5. Do not include any intro or outro text. Output only the days and exercises."""
|
| 30 |
|
| 31 |
return prompt, bmi, bmi_status, status_color
|