File size: 4,594 Bytes
afc9a8e
 
 
6fa9f54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
afc9a8e
c1a4e0b
6fa9f54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
afc9a8e
6fa9f54
 
afc9a8e
6fa9f54
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!DOCTYPE html>
<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>