srbhavya01 commited on
Commit
1ea5222
·
verified ·
1 Parent(s): 1758e56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -17
app.py CHANGED
@@ -60,23 +60,16 @@ def bmi_category(bmi):
60
  # Submit Button
61
  # -------------------------
62
 
63
- if st.button(" Generate 5-day workout plan"):
64
-
65
- # Validation
66
- if not name or height_cm <= 0 or weight_kg <= 0:
67
- st.error("⚠ Please fill all required fields with valid values!")
68
- else:
69
- bmi = calculate_bmi(weight_kg, height_cm)
70
- category = bmi_category(bmi)
71
 
72
- st.success(" Calculation Successful!")
73
 
74
- st.write(f"### 👤 Name: {name}")
75
- st.write(f"### 📊 Your BMI: {bmi}")
76
- st.write(f"### 🏷 BMI Category: {category}")
77
 
78
- st.write("---")
79
- st.write("### 🏋 Fitness Summary")
80
- st.write(f"**Goal:** {goal}")
81
- st.write(f"**Fitness Level:** {fitness_level}")
82
- st.write(f"**Equipment Available:** {', '.join(equipment) if equipment else 'None selected'}")
 
60
  # Submit Button
61
  # -------------------------
62
 
63
+ if st.button("Generate Workout Plan"):
64
+
65
+ bmi = calculate_bmi(weight_kg, height_cm)
66
+ category = bmi_category(bmi)
 
 
 
 
67
 
68
+ st.success(f"BMI: {bmi} ({category})")
69
 
70
+ workout_plan = generate_5day_plan(
71
+ name, bmi, category, fitness_level, equipment
72
+ )
73
 
74
+ st.subheader("🏋️ Your Personalized Workout Plan")
75
+ st.text(workout_plan)