Springboardmen commited on
Commit
444c89f
Β·
verified Β·
1 Parent(s): b8f77e5

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +67 -38
src/streamlit_app.py CHANGED
@@ -14,11 +14,15 @@ st.subheader("πŸ‘€ Personal Information")
14
 
15
  name = st.text_input("Enter Your Name")
16
 
17
- gender = st.selectbox(
18
- "Gender",
19
- ["Male", "Female", "Other"]
 
 
 
20
  )
21
 
 
22
  col1, col2 = st.columns(2)
23
 
24
  with col1:
@@ -28,7 +32,7 @@ with col2:
28
  weight = st.number_input("Weight (in kg)", min_value=30, max_value=200)
29
 
30
  # ---------------------------------------------------
31
- # BMI CALCULATION (Basic Logic Only)
32
  # ---------------------------------------------------
33
  bmi = None
34
 
@@ -54,40 +58,65 @@ goal = st.selectbox(
54
  )
55
 
56
  # ---------------------------------------------------
57
- # EQUIPMENT
58
  # ---------------------------------------------------
59
- st.subheader("Available Equipment")
60
-
61
- col1, col2 = st.columns(2)
62
-
63
- with col1:
64
- dumbbells = st.checkbox("Dumbbells")
65
- resistance_band = st.checkbox("Resistance Band")
66
- yoga_mat = st.checkbox("Yoga Mat")
67
- no_equipment = st.checkbox("No Equipment")
68
-
69
- with col2:
70
- treadmill = st.checkbox("Treadmill")
71
- cycle = st.checkbox("Cycle")
72
- pullups_bar = st.checkbox("Pullups Bar")
73
- weight_plates = st.checkbox("Weight Plates")
74
-
75
- equipment = []
76
-
77
- equipment_map = {
78
- "Dumbbells": dumbbells,
79
- "Resistance Band": resistance_band,
80
- "Yoga Mat": yoga_mat,
81
- "No Equipment": no_equipment,
82
- "Treadmill": treadmill,
83
- "Cycle": cycle,
84
- "Pullups Bar": pullups_bar,
85
- "Weight Plates": weight_plates,
86
- }
87
-
88
- for item, selected in equipment_map.items():
89
- if selected:
90
- equipment.append(item)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
 
92
  # ---------------------------------------------------
93
  # FITNESS LEVEL
@@ -101,7 +130,7 @@ fitness_level = st.radio(
101
  )
102
 
103
  # ---------------------------------------------------
104
- # SUBMIT BUTTON (Backend Receiving Data)
105
  # ---------------------------------------------------
106
  if st.button("Submit Profile"):
107
 
 
14
 
15
  name = st.text_input("Enter Your Name")
16
 
17
+ st.subheader("Gender")
18
+
19
+ gender = st.radio(
20
+ "",
21
+ ["Male", "Female"],
22
+ horizontal=True,index=0
23
  )
24
 
25
+
26
  col1, col2 = st.columns(2)
27
 
28
  with col1:
 
32
  weight = st.number_input("Weight (in kg)", min_value=30, max_value=200)
33
 
34
  # ---------------------------------------------------
35
+ # BMI CALCULATION
36
  # ---------------------------------------------------
37
  bmi = None
38
 
 
58
  )
59
 
60
  # ---------------------------------------------------
61
+ # EQUIPMENT (FULL IMPLEMENTATION)
62
  # ---------------------------------------------------
63
+ st.subheader("πŸ‹οΈ Available Equipment")
64
+
65
+ equipment_map = {}
66
+
67
+ # 🏠 Bodyweight
68
+ st.markdown("### 🏠 Bodyweight / No Equipment")
69
+ equipment_map["No Equipment"] = st.checkbox("No Equipment")
70
+ equipment_map["Pull-up Bar"] = st.checkbox("Pull-up Bar")
71
+ equipment_map["Dip Bars"] = st.checkbox("Dip Bars")
72
+ equipment_map["Push-up Handles"] = st.checkbox("Push-up Handles")
73
+
74
+ # πŸ‹οΈ Free Weights
75
+ st.markdown("### πŸ‹οΈ Free Weights")
76
+ equipment_map["Dumbbells"] = st.checkbox("Dumbbells")
77
+ equipment_map["Adjustable Dumbbells"] = st.checkbox("Adjustable Dumbbells")
78
+ equipment_map["Barbell"] = st.checkbox("Barbell")
79
+ equipment_map["Weight Plates"] = st.checkbox("Weight Plates")
80
+ equipment_map["Kettlebells"] = st.checkbox("Kettlebells")
81
+ equipment_map["Medicine Ball"] = st.checkbox("Medicine Ball")
82
+
83
+ # 🧘 Flexibility & Core
84
+ st.markdown("### 🧘 Flexibility & Core")
85
+ equipment_map["Yoga Mat"] = st.checkbox("Yoga Mat")
86
+ equipment_map["Resistance Band"] = st.checkbox("Resistance Band")
87
+ equipment_map["Bosu Ball"] = st.checkbox("Bosu Ball")
88
+ equipment_map["Stability Ball"] = st.checkbox("Stability Ball")
89
+ equipment_map["Foam Roller"] = st.checkbox("Foam Roller")
90
+ equipment_map["Hula Hoop Ring"] = st.checkbox("Hula Hoop Ring")
91
+
92
+ # πŸƒ Cardio Equipment
93
+ st.markdown("### πŸƒ Cardio Equipment")
94
+ equipment_map["Treadmill"] = st.checkbox("Treadmill")
95
+ equipment_map["Exercise Bike"] = st.checkbox("Exercise Bike")
96
+ equipment_map["Skipping Rope"] = st.checkbox("Skipping Rope")
97
+ equipment_map["Rowing Machine"] = st.checkbox("Rowing Machine")
98
+ equipment_map["Elliptical Trainer"] = st.checkbox("Elliptical Trainer")
99
+ equipment_map["Stair Climber"] = st.checkbox("Stair Climber")
100
+
101
+ # πŸ’ͺ Strength Machines
102
+ st.markdown("### πŸ’ͺ Strength Machines")
103
+ equipment_map["Incline Bench"] = st.checkbox("Incline Bench")
104
+ equipment_map["Flat Bench"] = st.checkbox("Flat Bench")
105
+ equipment_map["Smith Machine"] = st.checkbox("Smith Machine")
106
+ equipment_map["Leg Press Machine"] = st.checkbox("Leg Press Machine")
107
+ equipment_map["Cable Machine"] = st.checkbox("Cable Machine")
108
+ equipment_map["Lat Pulldown Machine"] = st.checkbox("Lat Pulldown Machine")
109
+ equipment_map["Chest Press Machine"] = st.checkbox("Chest Press Machine")
110
+
111
+ # βœ‹ Small Tools
112
+ st.markdown("### βœ‹ Small Training Tools")
113
+ equipment_map["Hand Gripper"] = st.checkbox("Hand Gripper")
114
+ equipment_map["Wrist Roller"] = st.checkbox("Wrist Roller")
115
+ equipment_map["Ankle Weights"] = st.checkbox("Ankle Weights")
116
+ equipment_map["Resistance Tubes"] = st.checkbox("Resistance Tubes")
117
+
118
+ # Convert selected equipment to list
119
+ equipment = [item for item, selected in equipment_map.items() if selected]
120
 
121
  # ---------------------------------------------------
122
  # FITNESS LEVEL
 
130
  )
131
 
132
  # ---------------------------------------------------
133
+ # SUBMIT BUTTON
134
  # ---------------------------------------------------
135
  if st.button("Submit Profile"):
136