Lucky Sharma
Upload 8 files
0ee0725 verified
<!DOCTYPE html>
<html>
<head>
<title>Prediction Result</title>
<link rel="stylesheet" href="{{ url_for('static', filename='flower-animation.css') }}">
<style>
body {
font-family: Arial, sans-serif;
max-width: 600px;
margin: 0 auto;
padding: 20px;
background-color: #f5f5f5;
position: relative;
min-height: 100vh;
}
.video-background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
overflow: hidden;
}
.video-background video {
width: 100%;
height: 100%;
object-fit: cover;
opacity: 0.3;
}
.video-background::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.7);
}
.result-container {
background-color: rgba(255, 255, 255, 0.95);
padding: 20px;
border-radius: 10px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
text-align: center;
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
h2 {
color: #4CAF50;
}
.prediction {
font-size: 24px;
color: #333;
margin: 20px 0;
}
.back-btn {
display: inline-block;
background-color: #4CAF50;
color: white;
padding: 10px 20px;
text-decoration: none;
border-radius: 4px;
margin-top: 20px;
}
.back-btn:hover {
background-color: #45a049;
}
.flower-info {
margin-top: 20px;
text-align: left;
padding: 15px;
background-color: rgba(249, 249, 249, 0.9);
border-radius: 8px;
}
.error {
color: #D8000C;
background-color: rgba(255, 210, 210, 0.9);
padding: 10px;
border-radius: 5px;
margin: 10px 0;
text-align: left;
}
.floating-flowers {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: -1;
}
.floating-flowers::before {
content: '🌸';
position: absolute;
top: 20%;
left: 10%;
font-size: 2em;
animation: float 6s ease-in-out infinite;
}
.floating-flowers::after {
content: '🌺';
position: absolute;
top: 60%;
right: 15%;
font-size: 1.5em;
animation: float 4s ease-in-out infinite reverse;
}
@keyframes float {
0%, 100% { transform: translateY(0px); }
50% { transform: translateY(-20px); }
}
</style>
</head>
<body>
<!-- Background video -->
<div class="video-background">
<video autoplay muted loop>
<source src="{{ url_for('static', filename='videos/flowers.mp4') }}" type="video/mp4">
<source src="https://cdn.pixabay.com/video/2019/06/10/24170-342584456_large.mp4" type="video/mp4">
<!-- Fallback for browsers that don't support video -->
<source src="https://media.giphy.com/media/3o7TKQkJJj8PJMJJhK/giphy.gif" type="video/gif">
</video>
</div>
<!-- Flower background -->
<div class="flower-background"></div>
<!-- Floating flowers animation -->
<div class="floating-flowers"></div>
<div class="flower-extra"></div>
<div class="flower-extra2"></div>
<div class="result-container">
<h2>🌸 Prediction Result 🌸</h2>
{% if error %}
<div class="error">
<p>{{ error }}</p>
<p>Please try again with different values or contact support.</p>
</div>
{% else %}
<div class="prediction">
The predicted flower is: <strong>{{ prediction }}</strong>
</div>
{% if 'setosa' in prediction.lower() %}
<div class="flower-info">
<p><strong>Iris setosa</strong> is known for its:</p>
<ul>
<li>Small petal size</li>
<li>Distinctive blue-green foliage</li>
<li>Native to North America and eastern Asia</li>
</ul>
</div>
{% elif 'versicolor' in prediction.lower() %}
<div class="flower-info">
<p><strong>Iris versicolor</strong> is known for its:</p>
<ul>
<li>Medium-sized flowers</li>
<li>Blue to purple coloration</li>
<li>Native to eastern North America</li>
</ul>
</div>
{% elif 'virginica' in prediction.lower() %}
<div class="flower-info">
<p><strong>Iris virginica</strong> is known for its:</p>
<ul>
<li>Large petal size</li>
<li>Violet blue to purple coloration</li>
<li>Native to eastern North America</li>
</ul>
</div>
{% endif %}
{% endif %}
<a href="/" class="back-btn">Make Another Prediction</a>
</div>
</body>
</html>