Update src/streamlit_app.py
Browse files- src/streamlit_app.py +49 -12
src/streamlit_app.py
CHANGED
|
@@ -1,16 +1,53 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
| 14 |
)
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
+
# Page config
|
| 4 |
+
st.set_page_config(page_title="Fitness Profile", page_icon="🏋️", layout="centered")
|
| 5 |
+
|
| 6 |
+
# Title
|
| 7 |
+
st.markdown("## 🏋️ Your Fitness Profile")
|
| 8 |
+
|
| 9 |
+
st.markdown("---")
|
| 10 |
+
|
| 11 |
+
# Fitness Goal
|
| 12 |
+
fitness_goal = st.selectbox(
|
| 13 |
+
"Fitness Goal",
|
| 14 |
+
["Build Muscle", "Lose Weight", "Improve Endurance", "General Fitness"]
|
| 15 |
)
|
| 16 |
|
| 17 |
+
# Available Equipment
|
| 18 |
+
st.write("Available Equipment")
|
| 19 |
+
col1, col2 = st.columns(2)
|
| 20 |
+
|
| 21 |
+
with col1:
|
| 22 |
+
dumbbells = st.checkbox("Dumbbells")
|
| 23 |
+
no_equipment = st.checkbox("No Equipment")
|
| 24 |
+
|
| 25 |
+
with col2:
|
| 26 |
+
resistance_bands = st.checkbox("Resistance Bands")
|
| 27 |
+
|
| 28 |
+
# Fitness Level
|
| 29 |
+
st.write("Fitness Level")
|
| 30 |
+
fitness_level = st.radio(
|
| 31 |
+
"",
|
| 32 |
+
["Beginner", "Intermediate", "Advanced"],
|
| 33 |
+
horizontal=True
|
| 34 |
+
)
|
| 35 |
+
|
| 36 |
+
st.markdown("")
|
| 37 |
+
|
| 38 |
+
# Generate Button
|
| 39 |
+
if st.button("Generate Personalized Plan", use_container_width=True):
|
| 40 |
+
st.success("Generating your personalized workout plan...")
|
| 41 |
+
|
| 42 |
+
st.write("### Your Selected Preferences:")
|
| 43 |
+
st.write("**Goal:**", fitness_goal)
|
| 44 |
+
st.write("**Equipment:**",
|
| 45 |
+
", ".join(
|
| 46 |
+
[item for item, selected in {
|
| 47 |
+
"Dumbbells": dumbbells,
|
| 48 |
+
"Resistance Bands": resistance_bands,
|
| 49 |
+
"No Equipment": no_equipment
|
| 50 |
+
}.items() if selected]
|
| 51 |
+
) or "None Selected"
|
| 52 |
+
)
|
| 53 |
+
st.write("**Fitness Level:**", fitness_level)
|