Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,8 +46,15 @@ def get_category(bmi):
|
|
| 46 |
def build_prompt(name, height, weight, goal, level, equipment, bmi, bmi_status):
|
| 47 |
equipment_list = ", ".join(equipment)
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
Client Details:
|
| 53 |
Name: {name}
|
|
@@ -58,23 +65,40 @@ Goal: {goal}
|
|
| 58 |
Fitness Level: {level}
|
| 59 |
Available Equipment: {equipment_list}
|
| 60 |
|
| 61 |
-
|
| 62 |
-
- Provide a structured 5-day plan.
|
| 63 |
-
- Each day must include:
|
| 64 |
-
- Warm-up
|
| 65 |
-
- Main Workout (Sets x Reps)
|
| 66 |
-
- Rest time
|
| 67 |
-
- Cooldown
|
| 68 |
-
- Ensure exercises match fitness level and equipment.
|
| 69 |
-
- Keep it practical and realistic.
|
| 70 |
-
- Format clearly as:
|
| 71 |
|
| 72 |
Day 1:
|
| 73 |
Warm-up:
|
| 74 |
-
Main Workout:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
Cooldown:
|
| 76 |
|
| 77 |
-
|
|
|
|
| 78 |
"""
|
| 79 |
|
| 80 |
return prompt.strip()
|
|
|
|
| 46 |
def build_prompt(name, height, weight, goal, level, equipment, bmi, bmi_status):
|
| 47 |
equipment_list = ", ".join(equipment)
|
| 48 |
|
| 49 |
+
prompt = f"""
|
| 50 |
+
You are a certified professional fitness trainer.
|
| 51 |
+
|
| 52 |
+
IMPORTANT:
|
| 53 |
+
- Do NOT write introduction.
|
| 54 |
+
- Do NOT write explanation.
|
| 55 |
+
- Do NOT give nutrition advice.
|
| 56 |
+
- Output ONLY the workout plan.
|
| 57 |
+
- Keep it concise.
|
| 58 |
|
| 59 |
Client Details:
|
| 60 |
Name: {name}
|
|
|
|
| 65 |
Fitness Level: {level}
|
| 66 |
Available Equipment: {equipment_list}
|
| 67 |
|
| 68 |
+
STRICT FORMAT:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
Day 1:
|
| 71 |
Warm-up:
|
| 72 |
+
Main Workout (sets x reps):
|
| 73 |
+
Rest:
|
| 74 |
+
Cooldown:
|
| 75 |
+
|
| 76 |
+
Day 2:
|
| 77 |
+
Warm-up:
|
| 78 |
+
Main Workout (sets x reps):
|
| 79 |
+
Rest:
|
| 80 |
+
Cooldown:
|
| 81 |
+
|
| 82 |
+
Day 3:
|
| 83 |
+
Warm-up:
|
| 84 |
+
Main Workout (sets x reps):
|
| 85 |
+
Rest:
|
| 86 |
+
Cooldown:
|
| 87 |
+
|
| 88 |
+
Day 4:
|
| 89 |
+
Warm-up:
|
| 90 |
+
Main Workout (sets x reps):
|
| 91 |
+
Rest:
|
| 92 |
+
Cooldown:
|
| 93 |
+
|
| 94 |
+
Day 5:
|
| 95 |
+
Warm-up:
|
| 96 |
+
Main Workout (sets x reps):
|
| 97 |
+
Rest:
|
| 98 |
Cooldown:
|
| 99 |
|
| 100 |
+
Each day must contain 4–5 exercises only.
|
| 101 |
+
Keep total response under 900 words.
|
| 102 |
"""
|
| 103 |
|
| 104 |
return prompt.strip()
|