| | import streamlit as st |
| |
|
| | |
| | st.set_page_config( |
| | page_title="Fitness Plan AI Generator", |
| | page_icon="πͺ", |
| | layout="centered" |
| | ) |
| |
|
| | |
| | st.markdown(""" |
| | <style> |
| | .stButton>button { |
| | width: 100%; |
| | height: 50px; |
| | font-size: 18px; |
| | background: linear-gradient(to right, #1f4e79, #2fa4a9); |
| | color: white; |
| | border-radius: 10px; |
| | } |
| | </style> |
| | """, unsafe_allow_html=True) |
| |
|
| | |
| | st.markdown("## π§ Your Fitness Profile") |
| |
|
| | |
| | goal = st.selectbox( |
| | "Fitness Goal", |
| | ["Build Muscle", "Lose Weight", "Improve Endurance", "General Fitness"] |
| | ) |
| |
|
| | |
| | st.markdown("### Available Equipment") |
| | col1, col2, col3 = st.columns(3) |
| |
|
| | with col1: |
| | dumbbells = st.checkbox("Dumbbells") |
| | with col2: |
| | bands = st.checkbox("Resistance Bands") |
| | with col3: |
| | no_equipment = st.checkbox("No Equipment") |
| |
|
| | |
| | st.markdown("### Fitness Level") |
| | level = st.radio( |
| | "", |
| | ["Beginner", "Intermediate", "Advanced"], |
| | horizontal=True |
| | ) |
| |
|
| | |
| | if st.button("Generate Personalised Plan"): |
| | st.markdown("---") |
| | st.markdown("## ποΈ Your Personalised Fitness Plan") |
| |
|
| | equipment = [] |
| | if dumbbells: |
| | equipment.append("Dumbbells") |
| | if bands: |
| | equipment.append("Resistance Bands") |
| | if no_equipment or not equipment: |
| | equipment.append("Bodyweight") |
| |
|
| | st.write(f"**Goal:** {goal}") |
| | st.write(f"**Level:** {level}") |
| | st.write(f"**Equipment:** {', '.join(equipment)}") |
| |
|
| | st.markdown("### π
Weekly Workout Plan") |
| |
|
| | if goal == "Build Muscle": |
| | st.write(""" |
| | - **Day 1:** Chest & Triceps |
| | - **Day 2:** Back & Biceps |
| | - **Day 3:** Legs |
| | - **Day 4:** Shoulders & Core |
| | - **Day 5:** Full Body |
| | - **Day 6:** Active Recovery |
| | - **Day 7:** Rest |
| | """) |
| | elif goal == "Lose Weight": |
| | st.write(""" |
| | - **Day 1:** Full Body HIIT |
| | - **Day 2:** Cardio + Core |
| | - **Day 3:** Strength Training |
| | - **Day 4:** HIIT |
| | - **Day 5:** Cardio |
| | - **Day 6:** Yoga / Stretching |
| | - **Day 7:** Rest |
| | """) |
| | else: |
| | st.write(""" |
| | - **Day 1:** Full Body |
| | - **Day 2:** Cardio |
| | - **Day 3:** Strength |
| | - **Day 4:** Mobility |
| | - **Day 5:** Mixed Training |
| | - **Day 6:** Light Cardio |
| | - **Day 7:** Rest |
| | """) |
| |
|
| | st.success("β
Plan generated successfully!") |
| |
|