Spaces:
Sleeping
Sleeping
<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> |