srustik123 commited on
Commit
a8dab6a
·
verified ·
1 Parent(s): bbf1e07

Update prompt_builder.py

Browse files
Files changed (1) hide show
  1. prompt_builder.py +48 -18
prompt_builder.py CHANGED
@@ -23,26 +23,56 @@ def build_prompt(name, gender, height, weight, goal, fitness_level, equipment):
23
  prompt = f"""
24
  You are a certified professional fitness trainer.
25
 
26
- Create a structured 5-day personalized workout plan.
 
 
 
 
 
27
 
28
  User Profile:
29
- - Name: {name}
30
- - Gender: {gender}
31
- - Height: {height} cm
32
- - Weight: {weight} kg
33
- - BMI: {bmi:.2f} ({bmi_status})
34
- - Goal: {goal}
35
- - Fitness Level: {fitness_level}
36
- - Available Equipment: {equipment_list}
37
-
38
- Instructions:
39
- 1. Divide clearly into Day 1 to Day 5.
40
- 2. Include exercise name.
41
- 3. Include sets and reps.
42
- 4. Include rest period.
43
- 5. Adjust intensity based on BMI category.
44
- 6. Avoid unsafe exercises for beginners.
45
- 7. Keep the plan professional and easy to follow.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  """
47
 
48
  return prompt, bmi, bmi_status
 
23
  prompt = f"""
24
  You are a certified professional fitness trainer.
25
 
26
+ IMPORTANT:
27
+ - Do NOT write introduction.
28
+ - Do NOT write explanation.
29
+ - Do NOT give nutrition advice.
30
+ - Output ONLY the workout plan.
31
+ - Keep it concise.
32
 
33
  User Profile:
34
+ Name: {name}
35
+ Gender: {gender}
36
+ Height: {height} cm
37
+ Weight: {weight} kg
38
+ BMI: {bmi:.2f} ({bmi_status})
39
+ Goal: {goal}
40
+ Fitness Level: {fitness_level}
41
+ Available Equipment: {equipment_list}
42
+
43
+ STRICT FORMAT:
44
+
45
+ Day 1:
46
+ Warm-up:
47
+ Main Workout (sets x reps):
48
+ Rest:
49
+ Cooldown:
50
+
51
+ Day 2:
52
+ Warm-up:
53
+ Main Workout (sets x reps):
54
+ Rest:
55
+ Cooldown:
56
+
57
+ Day 3:
58
+ Warm-up:
59
+ Main Workout (sets x reps):
60
+ Rest:
61
+ Cooldown:
62
+
63
+ Day 4:
64
+ Warm-up:
65
+ Main Workout (sets x reps):
66
+ Rest:
67
+ Cooldown:
68
+
69
+ Day 5:
70
+ Warm-up:
71
+ Main Workout (sets x reps):
72
+ Rest:
73
+ Cooldown:
74
+
75
+ Each day must contain at least 4 exercises.
76
  """
77
 
78
  return prompt, bmi, bmi_status