Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Iris Flower Predictor</title> | |
| <style> | |
| body { | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| background: linear-gradient(120deg, #89f7fe, #66a6ff); | |
| margin: 0; | |
| padding: 0; | |
| color: #333; | |
| } | |
| header { | |
| text-align: center; | |
| padding: 20px; | |
| background: rgba(255, 255, 255, 0.2); | |
| backdrop-filter: blur(10px); | |
| } | |
| header h1 { | |
| font-size: 2.5rem; | |
| color: #fff; | |
| letter-spacing: 2px; | |
| } | |
| .container { | |
| max-width: 900px; | |
| margin: 20px auto; | |
| padding: 20px; | |
| background: #fff; | |
| border-radius: 12px; | |
| box-shadow: 0px 8px 20px rgba(0,0,0,0.15); | |
| } | |
| form { | |
| margin-top: 20px; | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 15px; | |
| } | |
| form label { | |
| font-weight: bold; | |
| } | |
| form input { | |
| padding: 10px; | |
| border: 1px solid #ddd; | |
| border-radius: 6px; | |
| font-size: 1rem; | |
| width: 100%; | |
| } | |
| form button { | |
| grid-column: span 2; | |
| padding: 12px; | |
| font-size: 1rem; | |
| background: #66a6ff; | |
| color: #fff; | |
| border: none; | |
| border-radius: 8px; | |
| cursor: pointer; | |
| transition: 0.3s; | |
| } | |
| form button:hover { | |
| background: #4d8fe3; | |
| } | |
| .result { | |
| margin-top: 30px; | |
| font-size: 1.2rem; | |
| font-weight: bold; | |
| text-align: center; | |
| color: #2c3e50; | |
| } | |
| .species-info { | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: 20px; | |
| margin-top: 40px; | |
| } | |
| .species-card { | |
| flex: 1 1 calc(33% - 20px); | |
| background: #f9f9f9; | |
| border-radius: 10px; | |
| box-shadow: 0px 5px 15px rgba(0,0,0,0.1); | |
| overflow: hidden; | |
| text-align: center; | |
| padding: 15px; | |
| transition: transform 0.3s; | |
| } | |
| .species-card:hover { | |
| transform: translateY(-8px); | |
| } | |
| .species-card img { | |
| width: 100%; | |
| height: 180px; | |
| object-fit: cover; | |
| } | |
| .species-card h3 { | |
| margin-top: 10px; | |
| color: #444; | |
| } | |
| .species-card p { | |
| font-size: 0.9rem; | |
| color: #666; | |
| padding: 0 10px; | |
| } | |
| @media (max-width: 768px) { | |
| .species-card { | |
| flex: 1 1 100%; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <header> | |
| <h1>Iris Flower Predictor</h1> | |
| </header> | |
| <div class="container"> | |
| <h2>Enter Flower Measurements</h2> | |
| <form action="/predict" method="post"> | |
| <div> | |
| <label for="sl">Sepal Length (cm)</label> | |
| <input type="number" step="0.1" min="0" name="sl" id="sl" placeholder="e.g. 5.1" required> | |
| </div> | |
| <div> | |
| <label for="sw">Sepal Width (cm)</label> | |
| <input type="number" step="0.1" min="0" name="sw" id="sw" placeholder="e.g. 3.5" required> | |
| </div> | |
| <div> | |
| <label for="pl">Petal Length (cm)</label> | |
| <input type="number" step="0.1" min="0" name="pl" id="pl" placeholder="e.g. 1.4" required> | |
| </div> | |
| <div> | |
| <label for="pw">Petal Width (cm)</label> | |
| <input type="number" step="0.1" min="0" name="pw" id="pw" placeholder="e.g. 0.2" required> | |
| </div> | |
| <button type="submit">Find My Flower</button> | |
| </form> | |
| {% if result %} | |
| <div class="result"> | |
| Predicted Flower type is: {{ result }} | |
| </div> | |
| {% endif %} | |
| <h2 style="margin-top:40px;">About Iris Species</h2> | |
| <div class="species-info"> | |
| <div class="species-card"> | |
| <img src="https://upload.wikimedia.org/wikipedia/commons/a/a7/Irissetosa1.jpg" alt="Iris Setosa"> | |
| <h3>Iris Setosa</h3> | |
| <p>Setosa flowers are generally small, with narrow petals and light bluish-purple shades. They are distinct due to their short, broad sepal structure.</p> | |
| </div> | |
| <div class="species-card"> | |
| <img src="https://upload.wikimedia.org/wikipedia/commons/4/41/Iris_versicolor_2.jpg" alt="Iris Versicolor"> | |
| <h3>Iris Versicolor</h3> | |
| <p>Versicolor blooms are violet-blue with yellow accents. Medium-sized petals make them recognizable as Blue Flag Irises in wetlands.</p> | |
| </div> | |
| <div class="species-card"> | |
| <img src="https://upload.wikimedia.org/wikipedia/commons/9/9f/Iris_virginica.jpg" alt="Iris Virginica"> | |
| <h3>Iris Virginica</h3> | |
| <p>Virginica flowers have slender, long petals with rich purple hues. They usually grow near rivers and marshes in North America.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </body> | |
| </html> | |