File size: 4,743 Bytes
9c662ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81565bf
 
 
 
 
 
 
 
 
 
 
 
 
9c662ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8eb0de5
 
 
 
06ab6c2
8eb0de5
 
 
 
 
 
 
 
 
 
 
9c662ba
 
 
 
 
 
 
81565bf
8eb0de5
 
 
 
 
 
 
9c662ba
 
 
 
 
 
 
 
 
 
 
 
81565bf
9c662ba
 
81565bf
 
 
 
 
 
 
 
9c662ba
 
 
 
06ab6c2
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>College Predictor</title>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="{{ url_for('static', filename='script.js') }}"></script>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f8ff; /* Light blue background */
            color: #333;
            margin: 0;
            padding: 0;
        }

        h1 {
            text-align: center;
            color: #0044cc;
        }

        form {
            width: 400px;
            margin: 20px auto;
            padding: 20px;
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        label {
            display: block;
            margin-bottom: 8px;
            color: #0044cc;
            font-weight: bold;
        }

        input[type="number"], select {
            width: 100%;
            padding: 8px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
        }

        button {
            width: 100%;
            padding: 10px;
            background-color: #0044cc;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 16px;
            cursor: pointer;
        }

        button:hover {
            background-color: #003399;
        }

        h2 {
            text-align: center;
            color: #0044cc;
        }

        ul {
            width: 400px;
            margin: 20px auto;
            padding: 0;
            list-style: none;
        }

        ul li {
            background-color: #e6f0ff;
            padding: 10px;
            margin-bottom: 10px;
            border-radius: 4px;
            text-align: left;
        }

        .college-name {
            font-size: 18px;
            font-weight: bold;
            color: #003399;
        }

        .college-details {
            margin-top: 5px;
            font-size: 14px;
            color: #333;
        }

        /* Ensure responsiveness for smaller screens */
        @media (max-width: 600px) {
            form, ul {
                width: 90%;
            }
        }
    </style>
</head>
<body>
    <h1>College Admission Predictor</h1>

    <form method="POST">
        <label for="marks">Marks:</label>
        <input type="number" id="marks" name="marks" step="0.01" required>
        <br>

        <label for="gender">Gender:</label>
        <select id="gender" name="gender" required>
            <option value="General">General</option>
            <option value="Ladies">Female</option>
            <option value="Not Applicable">Not Applicable</option>
        </select>
        <br>

        <label for="category">Category:</label>
        <select id="category" name="category" required>
            {% for i in categories %}
                <option value="{{ i }}" {% if loop.index == 1 %} selected {% endif %}>{{ i }}</option>
            {% endfor %}
        </select>
        <br>

        <label for="zone">Zone:</label>
        <select id="zone" name="zone" required>
            {% for i in zones %}
                <option value="{{ i }}" {% if loop.index == 1 %} selected {% endif %}>{{ i }}</option>
            {% endfor %}
        </select>
        <br>

        <label for="seat_level">Home University:</label>
        <select id="seat_level" name="seat_level" required>
            {% for i in seat_levels %}
                <option value="{{ i }}" {% if loop.index == 1 %} selected {% endif %}>{{ i }}</option>
            {% endfor %}
        </select>
        <br>

        <label for="course">Course:</label>
        <select id="course" name="course" required>
            <!-- Options will be populated based on the selected zone -->
        </select>
        <br>
        <br>

        <button type="submit">Get Colleges</button>
    </form>

    <!-- Display the list of colleges -->
    {% if colleges_data %}
        <h2>Colleges you can get into:</h2>
        <ul>
            {% for college_name, college_info in colleges_data.items() %}
                <li>
                    <div class="college-name">{{ college_name }}</div>
                    <div class="college-details">
                        <strong>College Code:</strong> {{ college_info["college_code"] }}<br>
                        <strong>Prediction:</strong> {{ college_info["prediction"] }}
                    </div>
                </li>
            {% endfor %}
        </ul>
    {% endif %}
</body>
</html>