File size: 3,675 Bytes
0b252e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Gym Exercise and Routine Recommendation System</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
    <style>

        /* Basic CSS styling for the application */

        body {

            font-family: Arial, sans-serif;

            background-color: #f5f5f5;

            margin: 0;

            padding: 0;

        }

        .container {

            width: 50%;

            margin: 50px auto;

            background-color: #fff;

            padding: 20px 30px;

            border-radius: 8px;

            box-shadow: 0 2px 10px rgba(0,0,0,0.1);

        }

        h1 {

            text-align: center;

            color: #333;

        }

        form {

            display: flex;

            flex-direction: column;

        }

        label {

            margin-top: 10px;

            color: #555;

        }

        input[type="number"], select {

            padding: 8px;

            margin-top: 5px;

            border: 1px solid #ddd;

            border-radius: 4px;

        }

        button {

            margin-top: 20px;

            padding: 10px;

            background-color: #4285F4;

            color: #fff;

            border: none;

            border-radius: 4px;

            cursor: pointer;

            font-size: 16px;

        }

        button:hover {

            background-color: #357ae8;

        }

        .result {

            margin-top: 30px;

            padding: 15px;

            background-color: #e8f0fe;

            border-radius: 4px;

        }

        /* Table styling */

        table {

            width: 100%;

            border-collapse: collapse;

            margin-top: 20px;

        }

        table, th, td {

            border: 1px solid #ddd;

        }

        th, td {

            padding: 8px;

            text-align: center;

        }

        th {

            background-color: #4285F4;

            color: #fff;

        }

    </style>
</head>
<body>
    <div class="container">
        <h1>Gym Exercise and Routine Recommendation System</h1>
        <form method="POST">
            <label for="age">Enter your age:</label>
            <input type="number" name="age" id="age" min="1" max="120" value="30" required>

            <label for="height">Enter your height (in meters):</label>
            <input type="number" step="0.01" name="height" id="height" min="0.1" max="3.0" value="1.7" required>

            <label for="weight">Enter your weight (in kg):</label>
            <input type="number" name="weight" id="weight" min="1" max="500" value="70" required>

            <label for="target">Select your target:</label>
            <select name="target" id="target">
                <option value="Weight loss">Weight loss</option>
                <option value="Weight gain">Weight gain</option>
            </select>

            <label for="level">Select your level:</label>
            <select name="level" id="level">
                <option value="Beginner">Beginner</option>
                <option value="Intermediate">Intermediate</option>
                <option value="Advanced">Advanced</option>
            </select>

            <button type="submit">Generate Recommendations</button>
        </form>
        {% if recommendation %}
        <div class="result">
            <h2>Exercise Recommendations</h2>
            <!-- The recommendation will be rendered as formatted HTML -->
            {{ recommendation | safe }}
        </div>
        {% endif %}
    </div>
</body>
</html>