Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,23 +60,16 @@ def bmi_category(bmi):
|
|
| 60 |
# Submit Button
|
| 61 |
# -------------------------
|
| 62 |
|
| 63 |
-
if st.button("
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 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 |
-
|
| 73 |
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
| 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)
|
|
|
|
|
|
|
|
|