|
|
<!DOCTYPE html> |
|
|
<html> |
|
|
|
|
|
<head> |
|
|
<meta charset="utf-8"> |
|
|
<title>Linear Regression</title> |
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/model.css')}}"> |
|
|
<script> |
|
|
function validateForm() { |
|
|
var experienceField = document.getElementById("experience"); |
|
|
var experienceValue = experienceField.value; |
|
|
if (experienceValue < 0) { |
|
|
alert("Experience cannot be negative."); |
|
|
return false; |
|
|
} |
|
|
return true; |
|
|
} |
|
|
</script> |
|
|
</head> |
|
|
|
|
|
<body> |
|
|
<div class="header"> |
|
|
<img src="{{ url_for('static', filename='images/Model-Linear.png') }}" alt="Image" class="logo"> |
|
|
<h1>Linear Regression</h1> |
|
|
</div> |
|
|
|
|
|
|
|
|
<form method="post" action="{{ url_for('predict') }}" onsubmit="return validateForm()"> |
|
|
<div class="form-container"> |
|
|
<div class="form-group"> |
|
|
<label for="exampleInputPassword1">Job Position:</label><br> |
|
|
<select class="form-select" aria-label=".form-select-sm example" name="comp_select"> |
|
|
<option selected>Select Position</option> |
|
|
<option value="1">Junior</option> |
|
|
<option value="2">Senior</option> |
|
|
<option value="3">Project Manager</option> |
|
|
<option value="4">CTO</option> |
|
|
</select><br><br> |
|
|
<label for="experience">Experience:</label> |
|
|
<input type="number" id="experience" class="form-control" name="experience" placeholder="Experience" required="required"><br><br> |
|
|
</div> |
|
|
</div> |
|
|
<button type="submit" class="btn btn-primary">Predict</button> |
|
|
</form> |
|
|
|
|
|
<br> |
|
|
<label for="exampleInputPassword1">{{ position_level }}</label><br> |
|
|
<label for="exampleInputPassword1">{{ experience }}</label><br> |
|
|
<label for="exampleInputPassword1">{{ prediction_text }}</label> |
|
|
|
|
|
</body> |
|
|
|
|
|
</html> |
|
|
|