Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +185 -143
templates/index.html
CHANGED
|
@@ -37,11 +37,11 @@
|
|
| 37 |
.main-card {
|
| 38 |
animation: fadeInUp 0.8s ease-out;
|
| 39 |
width: 100%;
|
| 40 |
-
max-width:
|
| 41 |
background: linear-gradient(135deg, #fff9f1, #fff5e6);
|
| 42 |
border-radius: 1rem;
|
| 43 |
box-shadow: 0 10px 30px rgba(230, 126, 34, 0.15);
|
| 44 |
-
padding: 3rem
|
| 45 |
}
|
| 46 |
|
| 47 |
@keyframes fadeInUp {
|
|
@@ -55,100 +55,80 @@
|
|
| 55 |
}
|
| 56 |
}
|
| 57 |
|
| 58 |
-
/*
|
| 59 |
-
.
|
|
|
|
| 60 |
position: relative;
|
| 61 |
-
display: block;
|
| 62 |
-
}
|
| 63 |
-
|
| 64 |
-
/* Icon styling and positioning */
|
| 65 |
-
.input-icon {
|
| 66 |
-
position: absolute;
|
| 67 |
-
left: 15px;
|
| 68 |
-
color: #e67e22;
|
| 69 |
-
z-index: 10;
|
| 70 |
-
pointer-events: none;
|
| 71 |
-
transition: color 0.3s ease;
|
| 72 |
}
|
| 73 |
|
| 74 |
-
/*
|
| 75 |
-
.
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
border-radius: 0.75rem !important;
|
| 82 |
-
transition: all 0.3s ease;
|
| 83 |
}
|
| 84 |
|
| 85 |
-
.
|
| 86 |
-
.input-group select + .input-icon {
|
| 87 |
-
top: 50%;
|
| 88 |
-
transform: translateY(-50%);
|
| 89 |
font-size: 1.1rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
}
|
| 91 |
|
| 92 |
-
/*
|
| 93 |
-
.
|
| 94 |
-
|
| 95 |
-
padding-top: 14px;
|
| 96 |
-
border-width: 2px !important;
|
| 97 |
-
border-color: #f39c12 !important;
|
| 98 |
border-radius: 0.75rem !important;
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
.input-group textarea + .input-icon {
|
| 105 |
-
top: 14px;
|
| 106 |
-
font-size: 1.2rem;
|
| 107 |
-
line-height: 1;
|
| 108 |
-
transform: none;
|
| 109 |
}
|
| 110 |
|
| 111 |
-
|
| 112 |
-
input:focus, select:focus, textarea:focus {
|
| 113 |
outline: none !important;
|
| 114 |
-
box-shadow: 0 0 8px rgba(230, 126, 34, 0.
|
| 115 |
border-color: #e67e22 !important;
|
| 116 |
-
transform: scale(1.
|
| 117 |
-
|
| 118 |
-
}
|
| 119 |
-
|
| 120 |
-
/* Icon shake on focus */
|
| 121 |
-
.input-group:focus-within .input-icon {
|
| 122 |
-
animation: shake 0.5s ease-in-out;
|
| 123 |
}
|
| 124 |
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
|
|
|
| 129 |
}
|
| 130 |
|
| 131 |
/* Placeholder styling */
|
| 132 |
::placeholder {
|
| 133 |
color: #d35400;
|
| 134 |
opacity: 0.7;
|
|
|
|
| 135 |
}
|
| 136 |
|
| 137 |
/* Button styling */
|
| 138 |
-
.btn-
|
| 139 |
-
background: linear-gradient(45deg, #f39c12, #e67e22);
|
| 140 |
-
border: none;
|
| 141 |
transition: all 0.3s ease;
|
| 142 |
position: relative;
|
| 143 |
overflow: hidden;
|
| 144 |
-
border-radius: 0.75rem;
|
| 145 |
-
font-weight: 700;
|
| 146 |
-
font-size: 1.
|
| 147 |
-
padding:
|
| 148 |
box-shadow: 0 4px 12px rgba(231, 111, 32, 0.3);
|
|
|
|
|
|
|
|
|
|
| 149 |
}
|
| 150 |
|
| 151 |
-
.btn-
|
| 152 |
content: '';
|
| 153 |
position: absolute;
|
| 154 |
top: 0;
|
|
@@ -160,67 +140,97 @@
|
|
| 160 |
border-radius: 0.75rem;
|
| 161 |
}
|
| 162 |
|
| 163 |
-
.btn-
|
| 164 |
left: 100%;
|
| 165 |
}
|
| 166 |
|
| 167 |
-
.btn-
|
| 168 |
background: linear-gradient(45deg, #e67e22, #d68910) !important;
|
| 169 |
box-shadow: 0 8px 25px rgba(231, 111, 32, 0.5);
|
| 170 |
transform: translateY(-2px);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 171 |
}
|
| 172 |
|
| 173 |
/* Card hover */
|
| 174 |
-
.card:hover {
|
| 175 |
box-shadow: 0 20px 40px rgba(230, 126, 34, 0.25) !important;
|
| 176 |
-
transform: translateY(-
|
| 177 |
transition: all 0.3s ease;
|
| 178 |
}
|
| 179 |
|
| 180 |
/* Prediction result styling */
|
| 181 |
.prediction-result {
|
| 182 |
-
animation:
|
| 183 |
border: none;
|
| 184 |
-
background: linear-gradient(135deg, #
|
| 185 |
-
box-shadow: 0 4px 15px rgba(
|
| 186 |
border-radius: 0.75rem;
|
| 187 |
padding: 1.5rem;
|
| 188 |
margin-top: 1.5rem;
|
| 189 |
-
color: #
|
| 190 |
font-weight: 600;
|
| 191 |
-
font-size: 1.
|
| 192 |
text-align: center;
|
|
|
|
| 193 |
}
|
| 194 |
|
| 195 |
-
@keyframes
|
| 196 |
from {
|
| 197 |
opacity: 0;
|
| 198 |
-
transform:
|
| 199 |
}
|
| 200 |
to {
|
| 201 |
opacity: 1;
|
| 202 |
-
transform:
|
| 203 |
}
|
| 204 |
}
|
| 205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
/* Responsive adjustments */
|
| 207 |
-
@media (max-width:
|
| 208 |
.main-card {
|
| 209 |
-
padding: 2rem 1.5rem
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
}
|
|
|
|
| 211 |
h1 {
|
| 212 |
font-size: 1.8rem !important;
|
| 213 |
}
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
.
|
| 218 |
-
|
| 219 |
-
font-size: 1rem;
|
| 220 |
}
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
|
|
|
| 224 |
}
|
| 225 |
}
|
| 226 |
</style>
|
|
@@ -229,96 +239,116 @@
|
|
| 229 |
|
| 230 |
<main>
|
| 231 |
<div class="card main-card shadow-lg animate__animated">
|
| 232 |
-
<h1 class="text-center mb-
|
| 233 |
-
|
| 234 |
</h1>
|
| 235 |
|
| 236 |
<form method="post" class="needs-validation" novalidate id="predictionForm">
|
| 237 |
|
| 238 |
<!-- Ingredients -->
|
| 239 |
-
<div class="
|
| 240 |
-
<label for="ingredients" class="form-label
|
| 241 |
-
<
|
| 242 |
</label>
|
| 243 |
-
<textarea
|
| 244 |
-
|
| 245 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 246 |
</div>
|
| 247 |
|
| 248 |
<!-- Diet -->
|
| 249 |
-
<div class="
|
| 250 |
-
<label for="diet" class="form-label
|
| 251 |
-
<
|
| 252 |
</label>
|
| 253 |
<select id="diet" name="diet" required class="form-select">
|
| 254 |
-
<option value="" disabled selected>
|
| 255 |
-
<option value="vegetarian"
|
| 256 |
-
<option value="non vegetarian"
|
| 257 |
</select>
|
| 258 |
-
<
|
| 259 |
-
<div class="invalid-feedback">Please select a diet.</div>
|
| 260 |
</div>
|
| 261 |
|
| 262 |
<!-- Course -->
|
| 263 |
-
<div class="
|
| 264 |
-
<label for="course" class="form-label
|
| 265 |
-
<
|
| 266 |
</label>
|
| 267 |
<select id="course" name="course" required class="form-select">
|
| 268 |
-
<option value="" disabled selected>
|
| 269 |
-
<option value="
|
| 270 |
-
<option value="main course"
|
| 271 |
-
<option value="
|
| 272 |
-
<option value="snack"
|
| 273 |
</select>
|
| 274 |
-
<
|
| 275 |
-
<div class="invalid-feedback">Please select a course.</div>
|
| 276 |
</div>
|
| 277 |
|
| 278 |
<!-- Region -->
|
| 279 |
-
<div class="
|
| 280 |
-
<label for="region" class="form-label
|
| 281 |
-
<
|
| 282 |
</label>
|
| 283 |
<select id="region" name="region" required class="form-select">
|
| 284 |
-
<option value="" disabled selected>
|
| 285 |
-
<option value="
|
| 286 |
-
<option value="
|
| 287 |
-
<option value="
|
| 288 |
-
<option value="
|
| 289 |
</select>
|
| 290 |
-
<i class="fas fa-globe-americas input-icon"></i>
|
| 291 |
<div class="invalid-feedback">Please select a region.</div>
|
| 292 |
</div>
|
| 293 |
|
| 294 |
<!-- Prep & Cook Time -->
|
| 295 |
-
<div class="row
|
| 296 |
-
<div class="
|
| 297 |
-
<label for="prep_time" class="form-label
|
| 298 |
-
<
|
| 299 |
</label>
|
| 300 |
-
<input
|
| 301 |
-
|
| 302 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 303 |
</div>
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
|
|
|
| 307 |
</label>
|
| 308 |
-
<input
|
| 309 |
-
|
| 310 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 311 |
</div>
|
| 312 |
</div>
|
| 313 |
|
| 314 |
-
<button type="submit" class="btn btn-
|
| 315 |
-
|
| 316 |
</button>
|
| 317 |
</form>
|
| 318 |
|
| 319 |
{% if prediction %}
|
| 320 |
<div class="prediction-result">
|
| 321 |
-
|
| 322 |
</div>
|
| 323 |
{% endif %}
|
| 324 |
</div>
|
|
@@ -340,14 +370,26 @@
|
|
| 340 |
} else {
|
| 341 |
// Add loading state to button
|
| 342 |
const btn = document.getElementById('submitBtn');
|
| 343 |
-
btn.
|
| 344 |
-
btn.innerHTML = '<span class="spinner-border spinner-border-sm me-2" role="status"></span
|
| 345 |
btn.classList.add('animate__animated', 'animate__pulse');
|
| 346 |
}
|
| 347 |
form.classList.add('was-validated');
|
| 348 |
}, false);
|
| 349 |
});
|
| 350 |
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 351 |
</script>
|
| 352 |
</body>
|
| 353 |
-
</html>
|
|
|
|
| 37 |
.main-card {
|
| 38 |
animation: fadeInUp 0.8s ease-out;
|
| 39 |
width: 100%;
|
| 40 |
+
max-width: 600px;
|
| 41 |
background: linear-gradient(135deg, #fff9f1, #fff5e6);
|
| 42 |
border-radius: 1rem;
|
| 43 |
box-shadow: 0 10px 30px rgba(230, 126, 34, 0.15);
|
| 44 |
+
padding: 3rem;
|
| 45 |
}
|
| 46 |
|
| 47 |
@keyframes fadeInUp {
|
|
|
|
| 55 |
}
|
| 56 |
}
|
| 57 |
|
| 58 |
+
/* Form group styling */
|
| 59 |
+
.form-group {
|
| 60 |
+
margin-bottom: 1.5rem;
|
| 61 |
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
}
|
| 63 |
|
| 64 |
+
/* Label styling */
|
| 65 |
+
.form-label {
|
| 66 |
+
font-weight: 600 !important;
|
| 67 |
+
font-size: 1rem !important;
|
| 68 |
+
color: #8b4513 !important;
|
| 69 |
+
margin-bottom: 0.5rem !important;
|
| 70 |
+
display: block;
|
|
|
|
|
|
|
| 71 |
}
|
| 72 |
|
| 73 |
+
.label-icon {
|
|
|
|
|
|
|
|
|
|
| 74 |
font-size: 1.1rem;
|
| 75 |
+
margin-right: 0.5rem;
|
| 76 |
+
color: #e67e22;
|
| 77 |
+
width: 16px;
|
| 78 |
+
text-align: center;
|
| 79 |
}
|
| 80 |
|
| 81 |
+
/* Input styling */
|
| 82 |
+
.form-control, .form-select {
|
| 83 |
+
border: 2px solid #f39c12 !important;
|
|
|
|
|
|
|
|
|
|
| 84 |
border-radius: 0.75rem !important;
|
| 85 |
+
padding: 0.75rem 1rem !important;
|
| 86 |
+
font-size: 1rem !important;
|
| 87 |
+
transition: all 0.3s ease !important;
|
| 88 |
+
background-color: #fffbf7 !important;
|
| 89 |
+
min-height: 48px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
}
|
| 91 |
|
| 92 |
+
.form-control:focus, .form-select:focus {
|
|
|
|
| 93 |
outline: none !important;
|
| 94 |
+
box-shadow: 0 0 8px rgba(230, 126, 34, 0.4), 0 0 0 0.25rem rgba(230, 126, 34, 0.2) !important;
|
| 95 |
border-color: #e67e22 !important;
|
| 96 |
+
transform: scale(1.01);
|
| 97 |
+
background-color: #ffffff !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
}
|
| 99 |
|
| 100 |
+
/* Textarea specific */
|
| 101 |
+
textarea.form-control {
|
| 102 |
+
resize: vertical;
|
| 103 |
+
min-height: 100px !important;
|
| 104 |
+
padding-top: 0.75rem !important;
|
| 105 |
}
|
| 106 |
|
| 107 |
/* Placeholder styling */
|
| 108 |
::placeholder {
|
| 109 |
color: #d35400;
|
| 110 |
opacity: 0.7;
|
| 111 |
+
font-style: italic;
|
| 112 |
}
|
| 113 |
|
| 114 |
/* Button styling */
|
| 115 |
+
.btn-predict {
|
| 116 |
+
background: linear-gradient(45deg, #f39c12, #e67e22) !important;
|
| 117 |
+
border: none !important;
|
| 118 |
transition: all 0.3s ease;
|
| 119 |
position: relative;
|
| 120 |
overflow: hidden;
|
| 121 |
+
border-radius: 0.75rem !important;
|
| 122 |
+
font-weight: 700 !important;
|
| 123 |
+
font-size: 1.2rem !important;
|
| 124 |
+
padding: 1rem 2rem !important;
|
| 125 |
box-shadow: 0 4px 12px rgba(231, 111, 32, 0.3);
|
| 126 |
+
color: white !important;
|
| 127 |
+
width: 100%;
|
| 128 |
+
margin-top: 1rem;
|
| 129 |
}
|
| 130 |
|
| 131 |
+
.btn-predict::before {
|
| 132 |
content: '';
|
| 133 |
position: absolute;
|
| 134 |
top: 0;
|
|
|
|
| 140 |
border-radius: 0.75rem;
|
| 141 |
}
|
| 142 |
|
| 143 |
+
.btn-predict:hover::before {
|
| 144 |
left: 100%;
|
| 145 |
}
|
| 146 |
|
| 147 |
+
.btn-predict:hover {
|
| 148 |
background: linear-gradient(45deg, #e67e22, #d68910) !important;
|
| 149 |
box-shadow: 0 8px 25px rgba(231, 111, 32, 0.5);
|
| 150 |
transform: translateY(-2px);
|
| 151 |
+
color: white !important;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
/* Time inputs row */
|
| 155 |
+
.time-row {
|
| 156 |
+
display: grid;
|
| 157 |
+
grid-template-columns: 1fr 1fr;
|
| 158 |
+
gap: 1rem;
|
| 159 |
}
|
| 160 |
|
| 161 |
/* Card hover */
|
| 162 |
+
.main-card:hover {
|
| 163 |
box-shadow: 0 20px 40px rgba(230, 126, 34, 0.25) !important;
|
| 164 |
+
transform: translateY(-2px);
|
| 165 |
transition: all 0.3s ease;
|
| 166 |
}
|
| 167 |
|
| 168 |
/* Prediction result styling */
|
| 169 |
.prediction-result {
|
| 170 |
+
animation: slideInUp 0.6s ease-out;
|
| 171 |
border: none;
|
| 172 |
+
background: linear-gradient(135deg, #e8f5e8, #d4edda);
|
| 173 |
+
box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
|
| 174 |
border-radius: 0.75rem;
|
| 175 |
padding: 1.5rem;
|
| 176 |
margin-top: 1.5rem;
|
| 177 |
+
color: #155724;
|
| 178 |
font-weight: 600;
|
| 179 |
+
font-size: 1.1rem;
|
| 180 |
text-align: center;
|
| 181 |
+
border-left: 4px solid #28a745;
|
| 182 |
}
|
| 183 |
|
| 184 |
+
@keyframes slideInUp {
|
| 185 |
from {
|
| 186 |
opacity: 0;
|
| 187 |
+
transform: translateY(30px);
|
| 188 |
}
|
| 189 |
to {
|
| 190 |
opacity: 1;
|
| 191 |
+
transform: translateY(0);
|
| 192 |
}
|
| 193 |
}
|
| 194 |
|
| 195 |
+
/* Form validation styles */
|
| 196 |
+
.form-control.is-invalid, .form-select.is-invalid {
|
| 197 |
+
border-color: #dc3545 !important;
|
| 198 |
+
box-shadow: 0 0 8px rgba(220, 53, 69, 0.4) !important;
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
.invalid-feedback {
|
| 202 |
+
display: block;
|
| 203 |
+
color: #dc3545;
|
| 204 |
+
font-size: 0.875rem;
|
| 205 |
+
margin-top: 0.25rem;
|
| 206 |
+
font-style: italic;
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
/* Responsive adjustments */
|
| 210 |
+
@media (max-width: 768px) {
|
| 211 |
.main-card {
|
| 212 |
+
padding: 2rem 1.5rem;
|
| 213 |
+
margin: 1rem;
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
.time-row {
|
| 217 |
+
grid-template-columns: 1fr;
|
| 218 |
+
gap: 1rem;
|
| 219 |
}
|
| 220 |
+
|
| 221 |
h1 {
|
| 222 |
font-size: 1.8rem !important;
|
| 223 |
}
|
| 224 |
+
}
|
| 225 |
+
|
| 226 |
+
@media (max-width: 480px) {
|
| 227 |
+
.main-card {
|
| 228 |
+
padding: 1.5rem 1rem;
|
|
|
|
| 229 |
}
|
| 230 |
+
|
| 231 |
+
.btn-predict {
|
| 232 |
+
font-size: 1.1rem !important;
|
| 233 |
+
padding: 0.875rem 1.5rem !important;
|
| 234 |
}
|
| 235 |
}
|
| 236 |
</style>
|
|
|
|
| 239 |
|
| 240 |
<main>
|
| 241 |
<div class="card main-card shadow-lg animate__animated">
|
| 242 |
+
<h1 class="text-center mb-4 text-3xl font-extrabold text-orange-600 animate__animated animate__bounceIn">
|
| 243 |
+
๐ Indian Food Flavor Profile Prediction
|
| 244 |
</h1>
|
| 245 |
|
| 246 |
<form method="post" class="needs-validation" novalidate id="predictionForm">
|
| 247 |
|
| 248 |
<!-- Ingredients -->
|
| 249 |
+
<div class="form-group">
|
| 250 |
+
<label for="ingredients" class="form-label">
|
| 251 |
+
<span class="label-icon">๐ถ๏ธ</span>Ingredients
|
| 252 |
</label>
|
| 253 |
+
<textarea
|
| 254 |
+
id="ingredients"
|
| 255 |
+
name="ingredients"
|
| 256 |
+
rows="3"
|
| 257 |
+
required
|
| 258 |
+
placeholder="Enter ingredients separated by commas (e.g., cumin, coriander, ginger, turmeric)"
|
| 259 |
+
class="form-control"
|
| 260 |
+
></textarea>
|
| 261 |
+
<div class="invalid-feedback">Please enter at least one ingredient.</div>
|
| 262 |
</div>
|
| 263 |
|
| 264 |
<!-- Diet -->
|
| 265 |
+
<div class="form-group">
|
| 266 |
+
<label for="diet" class="form-label">
|
| 267 |
+
<span class="label-icon">๐ฅฌ</span>Diet Type
|
| 268 |
</label>
|
| 269 |
<select id="diet" name="diet" required class="form-select">
|
| 270 |
+
<option value="" disabled selected>Choose diet type</option>
|
| 271 |
+
<option value="vegetarian">๐ฑ Vegetarian</option>
|
| 272 |
+
<option value="non vegetarian">๐ Non Vegetarian</option>
|
| 273 |
</select>
|
| 274 |
+
<div class="invalid-feedback">Please select a diet type.</div>
|
|
|
|
| 275 |
</div>
|
| 276 |
|
| 277 |
<!-- Course -->
|
| 278 |
+
<div class="form-group">
|
| 279 |
+
<label for="course" class="form-label">
|
| 280 |
+
<span class="label-icon">๐ฝ๏ธ</span>Course Type
|
| 281 |
</label>
|
| 282 |
<select id="course" name="course" required class="form-select">
|
| 283 |
+
<option value="" disabled selected>Choose course type</option>
|
| 284 |
+
<option value="starter">๐ฅ Starter</option>
|
| 285 |
+
<option value="main course">๐ Main Course</option>
|
| 286 |
+
<option value="dessert">๐ฎ Dessert</option>
|
| 287 |
+
<option value="snack">๐ฟ Snack</option>
|
| 288 |
</select>
|
| 289 |
+
<div class="invalid-feedback">Please select a course type.</div>
|
|
|
|
| 290 |
</div>
|
| 291 |
|
| 292 |
<!-- Region -->
|
| 293 |
+
<div class="form-group">
|
| 294 |
+
<label for="region" class="form-label">
|
| 295 |
+
<span class="label-icon">๐บ๏ธ</span>Indian Region
|
| 296 |
</label>
|
| 297 |
<select id="region" name="region" required class="form-select">
|
| 298 |
+
<option value="" disabled selected>Choose regional cuisine</option>
|
| 299 |
+
<option value="North">๐๏ธ North Indian</option>
|
| 300 |
+
<option value="South">๐๏ธ South Indian</option>
|
| 301 |
+
<option value="East">๐
East Indian</option>
|
| 302 |
+
<option value="West">๐ West Indian</option>
|
| 303 |
</select>
|
|
|
|
| 304 |
<div class="invalid-feedback">Please select a region.</div>
|
| 305 |
</div>
|
| 306 |
|
| 307 |
<!-- Prep & Cook Time -->
|
| 308 |
+
<div class="time-row">
|
| 309 |
+
<div class="form-group">
|
| 310 |
+
<label for="prep_time" class="form-label">
|
| 311 |
+
<span class="label-icon">โฑ๏ธ</span>Prep Time (minutes)
|
| 312 |
</label>
|
| 313 |
+
<input
|
| 314 |
+
id="prep_time"
|
| 315 |
+
type="number"
|
| 316 |
+
name="prep_time"
|
| 317 |
+
min="0"
|
| 318 |
+
max="300"
|
| 319 |
+
required
|
| 320 |
+
placeholder="e.g., 15"
|
| 321 |
+
class="form-control"
|
| 322 |
+
/>
|
| 323 |
+
<div class="invalid-feedback">Enter preparation time (0-300 minutes).</div>
|
| 324 |
</div>
|
| 325 |
+
|
| 326 |
+
<div class="form-group">
|
| 327 |
+
<label for="cook_time" class="form-label">
|
| 328 |
+
<span class="label-icon">๐ฅ</span>Cook Time (minutes)
|
| 329 |
</label>
|
| 330 |
+
<input
|
| 331 |
+
id="cook_time"
|
| 332 |
+
type="number"
|
| 333 |
+
name="cook_time"
|
| 334 |
+
min="0"
|
| 335 |
+
max="600"
|
| 336 |
+
required
|
| 337 |
+
placeholder="e.g., 30"
|
| 338 |
+
class="form-control"
|
| 339 |
+
/>
|
| 340 |
+
<div class="invalid-feedback">Enter cooking time (0-600 minutes).</div>
|
| 341 |
</div>
|
| 342 |
</div>
|
| 343 |
|
| 344 |
+
<button type="submit" class="btn btn-predict shadow-sm" id="submitBtn">
|
| 345 |
+
โจ Predict Flavor Profile
|
| 346 |
</button>
|
| 347 |
</form>
|
| 348 |
|
| 349 |
{% if prediction %}
|
| 350 |
<div class="prediction-result">
|
| 351 |
+
๐ฏ Predicted Flavor Profile: <strong>{{ prediction }}</strong>
|
| 352 |
</div>
|
| 353 |
{% endif %}
|
| 354 |
</div>
|
|
|
|
| 370 |
} else {
|
| 371 |
// Add loading state to button
|
| 372 |
const btn = document.getElementById('submitBtn');
|
| 373 |
+
btn.disabled = true;
|
| 374 |
+
btn.innerHTML = '<span class="spinner-border spinner-border-sm me-2" role="status"></span>๐ฎ Analyzing flavors...';
|
| 375 |
btn.classList.add('animate__animated', 'animate__pulse');
|
| 376 |
}
|
| 377 |
form.classList.add('was-validated');
|
| 378 |
}, false);
|
| 379 |
});
|
| 380 |
})();
|
| 381 |
+
|
| 382 |
+
// Add some interactive feedback
|
| 383 |
+
document.querySelectorAll('.form-control, .form-select').forEach(input => {
|
| 384 |
+
input.addEventListener('focus', function() {
|
| 385 |
+
this.parentElement.style.transform = 'scale(1.01)';
|
| 386 |
+
this.parentElement.style.transition = 'transform 0.2s ease';
|
| 387 |
+
});
|
| 388 |
+
|
| 389 |
+
input.addEventListener('blur', function() {
|
| 390 |
+
this.parentElement.style.transform = 'scale(1)';
|
| 391 |
+
});
|
| 392 |
+
});
|
| 393 |
</script>
|
| 394 |
</body>
|
| 395 |
+
</html>
|