Amrutha04 commited on
Commit
ce01eb0
·
verified ·
1 Parent(s): 31f5639

Update prompt_builder.py

Browse files
Files changed (1) hide show
  1. 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
- Requirements:
30
- 1. Label days strictly as Day 1, Day 2, Day 3, Day 4, and Day 5.
31
- 2. Adjust exercise selection and intensity based on the user's age and BMI.
32
- 3. For each exercise, provide: Name, Sets, Reps, and Rest.
33
- 4. Be concise and eliminate extra blank lines.
34
- 5. Day 3 must be Rest.
35
- 6. Only output the workout routine."""
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