Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +83 -63
templates/index.html
CHANGED
|
@@ -1,78 +1,98 @@
|
|
| 1 |
<html>
|
| 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 |
padding: 10px;
|
| 29 |
-
border: none;
|
| 30 |
-
border-radius: 5px;
|
| 31 |
-
font-size: 16px;
|
| 32 |
-
}
|
| 33 |
-
button {
|
| 34 |
-
background-color: #4CAF50;
|
| 35 |
-
color: white;
|
| 36 |
-
cursor: pointer;
|
| 37 |
-
}
|
| 38 |
-
button:hover {
|
| 39 |
-
background-color: #45a049;
|
| 40 |
}
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
<body>
|
| 47 |
<form action="/predict" method="post">
|
| 48 |
-
<label for="sl">Enter sepal_length:</label
|
| 49 |
-
<input type="text" name="sl" required
|
| 50 |
|
| 51 |
-
<label for="sw">Enter sepal_width:</label
|
| 52 |
-
<input type="text" name="sw" required
|
| 53 |
|
| 54 |
-
<label for="pl">Enter petal_length:</label
|
| 55 |
-
<input type="text" name="pl" required
|
| 56 |
|
| 57 |
-
<label for="pw">Enter petal_width:</label
|
| 58 |
-
<input type="text" name="pw" required
|
| 59 |
|
| 60 |
-
<button type="submit">Submit</button>
|
| 61 |
-
<button><a href="/">Refresh</a></button>
|
| 62 |
</form>
|
| 63 |
|
|
|
|
|
|
|
| 64 |
{% if data %}
|
| 65 |
<h2>Prediction Result</h2>
|
| 66 |
<p>The predicted flower species is: <strong>{{ data }}</strong></p>
|
| 67 |
{% endif %}
|
| 68 |
-
|
| 69 |
{% if data=="setosa" %}
|
| 70 |
-
<img src="https://cdn-uploads.huggingface.co/production/uploads/6474405f90330355db146c76/iVXMOLPdx1ctqWnvnFED_.png" alt="IRIS SETOSA" width="200" height="200">
|
| 71 |
-
{% elif data
|
| 72 |
-
<img src="https://cdn.glitch.global/8599b2d2-58ab-4d42-98f5-97fa4c6bad04/Iris%20versicolor.png?v=1680866854461" alt="IRIS VERSICOLOR" width="200" height="200">
|
| 73 |
-
{% elif data=="virginica" %}
|
| 74 |
-
<img src="https://cdn.glitch.global/8599b2d2-58ab-4d42-98f5-97fa4c6bad04/Iris%20Virginica.png?v=1680866857022" alt="IRIS VIRGINICA" width="200" height="200">
|
| 75 |
-
{% endif %}
|
| 76 |
-
</center>
|
| 77 |
-
</body>
|
| 78 |
-
</html>
|
|
|
|
| 1 |
<html>
|
| 2 |
+
<head>
|
| 3 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 4 |
+
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='img/bird.png') }}">
|
| 5 |
+
<title>Home</title>
|
| 6 |
+
<style>
|
| 7 |
+
body {
|
| 8 |
+
background-image: url("https://cdn-uploads.huggingface.co/production/uploads/6474405f90330355db146c76/6-OP-BRC1dAJP0iIaxCrd.gif");
|
| 9 |
+
background-size: cover;
|
| 10 |
+
background-repeat: no-repeat;
|
| 11 |
+
background-attachment: fixed;
|
| 12 |
+
font-family: Arial, sans-serif;
|
| 13 |
+
color: white;
|
| 14 |
+
text-shadow: 1px 1px 2px black;
|
| 15 |
+
display: flex;
|
| 16 |
+
justify-content: center;
|
| 17 |
+
align-items: center;
|
| 18 |
+
min-height: 100vh;
|
| 19 |
+
margin: 0;
|
| 20 |
+
padding: 10px;
|
| 21 |
+
}
|
| 22 |
+
form {
|
| 23 |
+
background-color: rgba(0, 0, 0, 0.6);
|
| 24 |
+
padding: 20px;
|
| 25 |
+
border-radius: 10px;
|
| 26 |
+
width: 100%;
|
| 27 |
+
max-width: 350px; /* prevents it from being too wide on desktop */
|
| 28 |
+
box-shadow: 0 0 10px rgba(0,0,0,0.5);
|
| 29 |
+
box-sizing: border-box;
|
| 30 |
+
}
|
| 31 |
+
input, button {
|
| 32 |
+
margin: 10px 0;
|
| 33 |
+
width: 100%;
|
| 34 |
+
padding: 12px;
|
| 35 |
+
border: none;
|
| 36 |
+
border-radius: 5px;
|
| 37 |
+
font-size: 16px;
|
| 38 |
+
box-sizing: border-box;
|
| 39 |
+
}
|
| 40 |
+
button {
|
| 41 |
+
background-color: #4CAF50;
|
| 42 |
+
color: white;
|
| 43 |
+
cursor: pointer;
|
| 44 |
+
}
|
| 45 |
+
button:hover {
|
| 46 |
+
background-color: #45a049;
|
| 47 |
+
}
|
| 48 |
+
h2, p, img {
|
| 49 |
+
text-align: center;
|
| 50 |
+
}
|
| 51 |
+
.refresh-link {
|
| 52 |
+
display: block;
|
| 53 |
+
text-align: center;
|
| 54 |
+
text-decoration: none;
|
| 55 |
+
background: #4CAF50;
|
| 56 |
+
color: white;
|
| 57 |
+
padding: 12px;
|
| 58 |
+
border-radius: 5px;
|
| 59 |
+
margin: 15px auto 0;
|
| 60 |
+
max-width: 350px;
|
| 61 |
+
}
|
| 62 |
+
/* Make text slightly smaller on very small screens */
|
| 63 |
+
@media (max-width: 400px) {
|
| 64 |
+
input, button, .refresh-link {
|
| 65 |
+
font-size: 14px;
|
| 66 |
padding: 10px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
}
|
| 68 |
+
}
|
| 69 |
+
</style>
|
| 70 |
+
</head>
|
| 71 |
+
<body>
|
| 72 |
+
<div>
|
|
|
|
| 73 |
<form action="/predict" method="post">
|
| 74 |
+
<label for="sl">Enter sepal_length:</label>
|
| 75 |
+
<input type="text" name="sl" required>
|
| 76 |
|
| 77 |
+
<label for="sw">Enter sepal_width:</label>
|
| 78 |
+
<input type="text" name="sw" required>
|
| 79 |
|
| 80 |
+
<label for="pl">Enter petal_length:</label>
|
| 81 |
+
<input type="text" name="pl" required>
|
| 82 |
|
| 83 |
+
<label for="pw">Enter petal_width:</label>
|
| 84 |
+
<input type="text" name="pw" required>
|
| 85 |
|
| 86 |
+
<button type="submit">Submit</button>
|
|
|
|
| 87 |
</form>
|
| 88 |
|
| 89 |
+
<a href="/" class="refresh-link">Refresh</a>
|
| 90 |
+
|
| 91 |
{% if data %}
|
| 92 |
<h2>Prediction Result</h2>
|
| 93 |
<p>The predicted flower species is: <strong>{{ data }}</strong></p>
|
| 94 |
{% endif %}
|
| 95 |
+
|
| 96 |
{% if data=="setosa" %}
|
| 97 |
+
<center><img src="https://cdn-uploads.huggingface.co/production/uploads/6474405f90330355db146c76/iVXMOLPdx1ctqWnvnFED_.png" alt="IRIS SETOSA" width="200" height="200"></center>
|
| 98 |
+
{% elif data=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|