iris / templates /index.html
Karanveer0990's picture
Update templates/index.html
db4ca59 verified
<html>
<head>
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='img/images.jpg') }}">
<title>Iris Flower Prediction</title>
<style>
body {
background-image: url("https://media4.giphy.com/media/v1.Y2lkPTc5MGI3NjExMHk1dnJkd3ByMmFpazRzbjRpbHR3YnU2M2Y0OHcwZWF4azdxd3R1ZyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/d88tKlampLOqdCOnad/giphy.gif");
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: #ffffff;
text-shadow: 1px 1px 4px #000000;
margin: 0;
padding: 0;
}
form {
background-color: rgba(255, 255, 255, 0.15);
padding: 25px;
border-radius: 15px;
width: 320px;
margin: 80px auto;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
backdrop-filter: blur(8px);
}
input, button {
margin: 10px 0;
width: 100%;
padding: 10px;
border: none;
border-radius: 8px;
font-size: 16px;
box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
input {
background-color: rgba(255, 255, 255, 0.9);
color: #333;
}
button {
background-color: #6a1b9a;
color: white;
cursor: pointer;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #8e24aa;
}
h2, p, img {
text-align: center;
}
a {
color: white;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.result {
margin-top: 30px;
}
img {
margin-top: 15px;
border-radius: 10px;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
</style>
</head>
<body>
<form action="/predict" method="post">
<label for="sl">Enter sepal_length:</label><br>
<input type="text" name="sl" required><br>
<label for="sw">Enter sepal_width:</label><br>
<input type="text" name="sw" required><br>
<label for="pl">Enter petal_length:</label><br>
<input type="text" name="pl" required><br>
<label for="pw">Enter petal_width:</label><br>
<input type="text" name="pw" required><br>
<button type="submit">Submit</button> <br>
<button><a href="/">Refresh</a></button>
</form>
{% if data %}
<div class="result">
<h2>Prediction Result</h2>
<p>The predicted flower species is: <strong>{{ data }}</strong></p>
<center>
{% if data == "setosa" %}
<img src="https://cdn-uploads.huggingface.co/production/uploads/6474405f90330355db146c76/iVXMOLPdx1ctqWnvnFED_.png" alt="IRIS SETOSA" width="200" height="200">
{% elif data == "versicolor" %}
<img src="https://cdn.glitch.global/8599b2d2-58ab-4d42-98f5-97fa4c6bad04/Iris%20versicolor.png?v=1680866854461" alt="IRIS VERSICOLOR" width="200" height="200">
{% elif data == "virginica" %}
<img src="https://cdn.glitch.global/8599b2d2-58ab-4d42-98f5-97fa4c6bad04/Iris%20Virginica.png?v=1680866857022" alt="IRIS VIRGINICA" width="200" height="200">
{% endif %}
</center>
</div>
{% endif %}
</body>
</html>