My-Space / templates /predictpage.html
Logan-Mutant's picture
Update templates/predictpage.html
21c311e verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Iris Predictor</title>
<style>
/* Background GIF styling */
body {
margin: 0;
padding: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: url('https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExNHJueW9qZ2Z6Znh6Znh6Znh6Znh6Znh6Znh6Znh6Znh6Znh6Znh6JmVwPXYxX2ludGVybmFsX2dpZl9ieV9pZCZjdD1n/3o7TKMGpxxZBSqeL5u/giphy.gif') no-repeat center center fixed;
background-size: cover;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
}
/* Semi-transparent glass effect container */
.glass-card {
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(10px);
padding: 30px;
border-radius: 20px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
width: 90%;
max-width: 400px;
text-align: center;
}
h1 {
color: #333;
font-size: 1.5rem;
margin-bottom: 25px;
}
/* Mobile-optimized inputs */
input[type="number"] {
width: 100%;
padding: 12px;
margin: 8px 0;
border: 2px solid #ddd;
border-radius: 10px;
font-size: 16px; /* Prevents iOS auto-zoom on focus */
box-sizing: border-box;
transition: border-color 0.3s;
}
input[type="number"]:focus {
border-color: #007bff;
outline: none;
}
input[type="submit"] {
width: 100%;
background: #007bff;
color: white;
border: none;
padding: 15px;
border-radius: 10px;
font-size: 1.1rem;
font-weight: bold;
margin-top: 15px;
cursor: pointer;
}
.prediction-result {
background: #d4edda;
color: #155724;
padding: 15px;
border-radius: 10px;
margin-top: 20px;
font-weight: bold;
}
.home-link {
display: inline-block;
margin-top: 20px;
color: #007bff;
text-decoration: none;
font-weight: 500;
}
</style>
</head>
<body>
<div class="glass-card">
<h1>Iris Flower Predictor</h1>
<form action="/predictiris" method="POST">
<input type="number" name="sepal_length" placeholder="Sepal Length (e.g. 5.1)"
step="0.1" min="0.1" max="15.0" required>
<input type="number" name="sepal_width" placeholder="Sepal Width (e.g. 3.5)"
step="0.1" min="0.1" max="15.0" required>
<input type="number" name="petal_length" placeholder="Petal Length (e.g. 1.4)"
step="0.1" min="0.1" max="15.0" required>
<input type="number" name="petal_width" placeholder="Petal Width (e.g. 0.2)"
step="0.1" min="0.1" max="15.0" required>
<input type="submit" value="Predict Species">
</form>
{% if prediction %}
<div class="prediction-result">
Result: {{ prediction }}
</div>
{% endif %}
<a href="/" class="home-link">← Back to Home</a>
</div>
</body>
</html>