File size: 2,528 Bytes
09d1ec5
51f28ea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import streamlit as st

# Page configuration
st.set_page_config(
    page_title="Fitness Plan AI Generator",
    page_icon="💪",
    layout="centered"
)

# Custom CSS for better UI
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)

# Title
st.markdown("## 🧍 Your Fitness Profile")

# Fitness Goal
goal = st.selectbox(
    "Fitness Goal",
    ["Build Muscle", "Lose Weight", "Improve Endurance", "General Fitness"]
)

# Equipment Selection
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")

# Fitness Level
st.markdown("### Fitness Level")
level = st.radio(
    "",
    ["Beginner", "Intermediate", "Advanced"],
    horizontal=True
)

# Generate Plan Button
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!")