dilpreet77 commited on
Commit
50d5bd6
·
verified ·
1 Parent(s): 195e83f

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +128 -214
templates/index.html CHANGED
@@ -22,117 +22,7 @@
22
  position: relative;
23
  }
24
 
25
- /* Enhanced animated background with foody elements */
26
- body::before {
27
- content: '';
28
- position: fixed;
29
- top: 0;
30
- left: 0;
31
- width: 100%;
32
- height: 100%;
33
- background-image:
34
- /* Spice particles (cumin-like dots) */
35
- radial-gradient(3px 3px at 20px 30px, #8B4513, transparent),
36
- radial-gradient(2px 2px at 80px 50px, #FF4500, transparent),
37
- radial-gradient(4px 4px at 150px 20px, #D2691E, transparent),
38
- /* Steam wisps (curved lines for cooking steam) */
39
- radial-gradient(1px 20px at 60px 80px, rgba(255, 255, 255, 0.6), transparent),
40
- radial-gradient(1px 15px at 200px 100px, rgba(255, 255, 255, 0.4), transparent),
41
- /* Floating leaf/curry leaf shapes */
42
- radial-gradient(ellipse 10px 5px at 120px 60px, #228B22, transparent),
43
- radial-gradient(ellipse 8px 4px at 250px 90px, #32CD32, transparent);
44
- background-repeat: repeat;
45
- background-size: 300px 200px;
46
- animation: floatSpices 25s linear infinite;
47
- pointer-events: none;
48
- z-index: -1;
49
- opacity: 0.4;
50
- }
51
-
52
- /* Additional foody animation layer: Rising bubbles/steam */
53
- body::after {
54
- content: '';
55
- position: fixed;
56
- top: 0;
57
- left: 0;
58
- width: 100%;
59
- height: 100%;
60
- background-image:
61
- radial-gradient(circle 5px at 40px 90%, rgba(255, 193, 7, 0.5), transparent),
62
- radial-gradient(circle 3px at 100px 70%, rgba(255, 140, 0, 0.4), transparent),
63
- radial-gradient(circle 4px at 180px 85%, rgba(255, 69, 0, 0.3), transparent),
64
- radial-gradient(circle 6px at 300px 95%, rgba(255, 215, 0, 0.5), transparent);
65
- background-repeat: repeat;
66
- background-size: 400px 150px;
67
- animation: riseSteam 15s ease-in-out infinite;
68
- pointer-events: none;
69
- z-index: -1;
70
- opacity: 0.3;
71
- }
72
-
73
- @keyframes floatSpices {
74
- 0% {
75
- transform: translateY(0px) rotate(0deg);
76
- opacity: 0.4;
77
- }
78
- 50% {
79
- opacity: 0.8;
80
- }
81
- 100% {
82
- transform: translateY(-200px) rotate(180deg);
83
- opacity: 0.4;
84
- }
85
- }
86
-
87
- @keyframes riseSteam {
88
- 0% {
89
- transform: translateY(100vh) scale(0);
90
- opacity: 0;
91
- }
92
- 10% {
93
- opacity: 1;
94
- }
95
- 90% {
96
- opacity: 1;
97
- }
98
- 100% {
99
- transform: translateY(-100px) scale(1.5);
100
- opacity: 0;
101
- }
102
- }
103
-
104
- /* Subtle rotating utensil in background (optional, low opacity) */
105
- .bg-utensil {
106
- position: fixed;
107
- top: 20%;
108
- right: 10%;
109
- font-size: 3rem;
110
- color: rgba(230, 126, 34, 0.1);
111
- z-index: -1;
112
- animation: rotateUtensil 20s linear infinite;
113
- }
114
-
115
- .bg-plate {
116
- position: fixed;
117
- bottom: 20%;
118
- left: 10%;
119
- font-size: 4rem;
120
- color: rgba(255, 193, 7, 0.08);
121
- z-index: -1;
122
- animation: bouncePlate 8s ease-in-out infinite;
123
- }
124
-
125
- @keyframes rotateUtensil {
126
- from { transform: rotate(0deg); }
127
- to { transform: rotate(360deg); }
128
- }
129
-
130
- @keyframes bouncePlate {
131
- 0%, 100% { transform: translateY(0px); }
132
- 50% { transform: translateY(-20px); }
133
- }
134
-
135
- /* Ensure main content is perfectly centered */
136
  main {
137
  min-height: 100vh;
138
  display: flex;
@@ -143,11 +33,15 @@
143
  z-index: 1;
144
  }
145
 
146
- /* Card entrance animation */
147
  .main-card {
148
  animation: fadeInUp 0.8s ease-out;
149
  width: 100%;
150
  max-width: 540px;
 
 
 
 
151
  }
152
 
153
  @keyframes fadeInUp {
@@ -161,17 +55,70 @@
161
  }
162
  }
163
 
164
- /* Smooth input focus ring with scale */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  input:focus, select:focus, textarea:focus {
166
  outline: none !important;
167
- box-shadow: 0 0 8px rgba(230, 126, 34, 0.6), 0 0 0 0.2rem rgba(230, 126, 34, 0.25) !important;
168
  border-color: #e67e22 !important;
169
  transform: scale(1.02);
170
  transition: all 0.3s ease;
171
  }
172
 
173
- /* Icon shake on focus for fun */
174
- .input-group:focus-within i.input-icon {
175
  animation: shake 0.5s ease-in-out;
176
  }
177
 
@@ -187,13 +134,18 @@
187
  opacity: 0.7;
188
  }
189
 
190
- /* Enhanced button hover with pulse */
191
  .btn-warning {
192
  background: linear-gradient(45deg, #f39c12, #e67e22);
193
  border: none;
194
  transition: all 0.3s ease;
195
  position: relative;
196
  overflow: hidden;
 
 
 
 
 
197
  }
198
 
199
  .btn-warning::before {
@@ -205,6 +157,7 @@
205
  height: 100%;
206
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
207
  transition: left 0.5s;
 
208
  }
209
 
210
  .btn-warning:hover::before {
@@ -213,23 +166,30 @@
213
 
214
  .btn-warning:hover {
215
  background: linear-gradient(45deg, #e67e22, #d68910) !important;
216
- box-shadow: 0 8px 25px rgba(231, 111, 32, 0.4);
217
  transform: translateY(-2px);
218
  }
219
 
220
- /* Card hover enhancement */
221
  .card:hover {
222
  box-shadow: 0 20px 40px rgba(230, 126, 34, 0.25) !important;
223
  transform: translateY(-5px);
224
  transition: all 0.3s ease;
225
  }
226
 
227
- /* Prediction slide-in animation */
228
  .prediction-result {
229
  animation: slideInRight 0.6s ease-out;
230
  border: none;
231
  background: linear-gradient(135deg, #fff8f0, #ffe8cc);
232
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.1);
 
 
 
 
 
 
 
233
  }
234
 
235
  @keyframes slideInRight {
@@ -243,99 +203,32 @@
243
  }
244
  }
245
 
246
- /* Improved Input group styling for icons - Fixed positioning */
247
- .input-group {
248
- position: relative;
249
- display: block; /* Ensure consistent layout */
250
- }
251
-
252
- .input-group .input-icon {
253
- position: absolute;
254
- left: 12px;
255
- color: #e67e22;
256
- z-index: 10;
257
- transition: color 0.3s ease;
258
- pointer-events: none; /* Prevent icon from interfering with input */
259
- }
260
-
261
- /* For single-line inputs and selects: center vertically */
262
- .input-group input:not(textarea), .input-group select {
263
- padding-left: 40px;
264
- min-height: 42px; /* Consistent height for alignment */
265
- }
266
-
267
- .input-group input:not(textarea) + .input-icon,
268
- .input-group select + .input-icon {
269
- top: 50%;
270
- transform: translateY(-50%);
271
- font-size: 1rem;
272
- }
273
-
274
- /* For textarea: Align icon to the top-left, near the first line */
275
- .input-group textarea {
276
- padding-left: 40px;
277
- padding-top: 12px; /* Space for icon */
278
- resize: vertical; /* Allow vertical resize only */
279
- }
280
-
281
- .input-group textarea + .input-icon {
282
- top: 12px;
283
- transform: none; /* No vertical centering for multi-line */
284
- font-size: 1.1rem;
285
- line-height: 1;
286
- }
287
-
288
- /* Loading spinner for button */
289
- .btn-loading {
290
- pointer-events: none;
291
- opacity: 0.7;
292
- }
293
-
294
- .spinner-border-sm {
295
- width: 1rem;
296
- height: 1rem;
297
- }
298
-
299
  /* Responsive adjustments */
300
  @media (max-width: 576px) {
301
- .card {
302
- margin: 10px;
303
- padding: 20px !important;
304
  }
305
-
306
  h1 {
307
  font-size: 1.8rem !important;
308
  }
309
-
310
- /* Hide background elements on small screens for performance */
311
- body::before, body::after, .bg-utensil, .bg-plate {
312
- display: none;
313
- }
314
-
315
- /* Adjust icon padding on mobile */
316
  .input-group input, .input-group select, .input-group textarea {
317
- padding-left: 35px;
318
  }
319
-
320
  .input-group .input-icon {
321
- left: 10px;
322
- font-size: 0.9rem;
 
 
 
 
323
  }
324
  }
325
  </style>
326
  </head>
327
  <body>
328
 
329
- <!-- Background foody elements -->
330
- <div class="bg-utensil">
331
- <i class="fas fa-utensils"></i>
332
- </div>
333
- <div class="bg-plate">
334
- <i class="fas fa-circle"></i> <!-- Simple plate representation -->
335
- </div>
336
-
337
  <main>
338
- <div class="card main-card shadow-lg rounded-4 p-5 w-100 animate__animated" style="background: linear-gradient(135deg, #fff9f1, #fff5e6);">
339
  <h1 class="text-center mb-5 text-4xl font-extrabold text-orange-600 animate__animated animate__bounceIn">
340
  <i class="fas fa-utensils me-2"></i>Indian Food Flavor Profile Prediction
341
  </h1>
@@ -347,7 +240,7 @@
347
  <label for="ingredients" class="form-label fw-semibold fs-6 text-secondary">
348
  <i class="fas fa-list me-1"></i>Ingredients (comma separated):
349
  </label>
350
- <textarea id="ingredients" name="ingredients" rows="3" required placeholder="e.g., cumin, coriander, ginger" class="form-control rounded-3 border-2 border-warning"></textarea>
351
  <i class="fas fa-pepper-hot input-icon"></i>
352
  <div class="invalid-feedback">Please enter ingredients.</div>
353
  </div>
@@ -357,7 +250,7 @@
357
  <label for="diet" class="form-label fw-semibold fs-6 text-secondary">
358
  <i class="fas fa-leaf me-1"></i>Diet:
359
  </label>
360
- <select id="diet" name="diet" required class="form-select rounded-3 border-2 border-warning">
361
  <option value="" disabled selected>Select diet</option>
362
  <option value="vegetarian">Vegetarian</option>
363
  <option value="non vegetarian">Non Vegetarian</option>
@@ -371,7 +264,7 @@
371
  <label for="course" class="form-label fw-semibold fs-6 text-secondary">
372
  <i class="fas fa-drumstick-bite me-1"></i>Course:
373
  </label>
374
- <select id="course" name="course" required class="form-select rounded-3 border-2 border-warning">
375
  <option value="" disabled selected>Select course</option>
376
  <option value="dessert">Dessert</option>
377
  <option value="main course">Main Course</option>
@@ -387,7 +280,7 @@
387
  <label for="region" class="form-label fw-semibold fs-6 text-secondary">
388
  <i class="fas fa-map-marker-alt me-1"></i>Region:
389
  </label>
390
- <select id="region" name="region" required class="form-select rounded-3 border-2 border-warning">
391
  <option value="" disabled selected>Select region</option>
392
  <option value="East">East</option>
393
  <option value="West">West</option>
@@ -400,35 +293,31 @@
400
 
401
  <!-- Prep & Cook Time -->
402
  <div class="row mb-4 g-3">
403
- <div class="col-6">
404
  <label for="prep_time" class="form-label fw-semibold fs-6 text-secondary">
405
  <i class="fas fa-clock me-1"></i>Preparation Time (minutes):
406
  </label>
407
- <div class="input-group">
408
- <input id="prep_time" type="number" name="prep_time" min="0" required placeholder="e.g., 15" class="form-control rounded-3 border-2 border-warning" />
409
- <i class="fas fa-stopwatch input-icon"></i>
410
- </div>
411
  <div class="invalid-feedback">Please enter preparation time.</div>
412
  </div>
413
- <div class="col-6">
414
  <label for="cook_time" class="form-label fw-semibold fs-6 text-secondary">
415
  <i class="fas fa-fire me-1"></i>Cook Time (minutes):
416
  </label>
417
- <div class="input-group">
418
- <input id="cook_time" type="number" name="cook_time" min="0" required placeholder="e.g., 30" class="form-control rounded-3 border-2 border-warning" />
419
- <i class="fas fa-burn input-icon"></i>
420
- </div>
421
  <div class="invalid-feedback">Please enter cook time.</div>
422
  </div>
423
  </div>
424
 
425
- <button type="submit" class="btn btn-warning w-100 py-3 fs-5 fw-bold shadow-sm mb-3" id="submitBtn">
426
  <i class="fas fa-magic me-2"></i>Predict Flavor Profile
427
  </button>
428
  </form>
429
 
430
  {% if prediction %}
431
- <div class="prediction-result mt-4 p-4 rounded-3 bg-gradient text-warning fs-5 text-center shadow-sm fw-semibold border-0">
432
  <i class="fas fa-star-and-crescent me-2"></i>Predicted Flavor Profile: {{ prediction }}
433
  </div>
434
  {% endif %}
@@ -436,4 +325,29 @@
436
  </main>
437
 
438
  <!-- Bootstrap JS Bundle -->
439
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.4.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  position: relative;
23
  }
24
 
25
+ /* Center main content */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  main {
27
  min-height: 100vh;
28
  display: flex;
 
33
  z-index: 1;
34
  }
35
 
36
+ /* Card styling */
37
  .main-card {
38
  animation: fadeInUp 0.8s ease-out;
39
  width: 100%;
40
  max-width: 540px;
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 3rem 2rem;
45
  }
46
 
47
  @keyframes fadeInUp {
 
55
  }
56
  }
57
 
58
+ /* Input group styling */
59
+ .input-group {
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
+ /* For single-line inputs and selects */
75
+ .input-group input:not(textarea),
76
+ .input-group select {
77
+ padding-left: 45px;
78
+ min-height: 44px;
79
+ border-width: 2px !important;
80
+ border-color: #f39c12 !important;
81
+ border-radius: 0.75rem !important;
82
+ transition: all 0.3s ease;
83
+ }
84
+
85
+ .input-group input:not(textarea) + .input-icon,
86
+ .input-group select + .input-icon {
87
+ top: 50%;
88
+ transform: translateY(-50%);
89
+ font-size: 1.1rem;
90
+ }
91
+
92
+ /* For textarea */
93
+ .input-group textarea {
94
+ padding-left: 45px;
95
+ padding-top: 14px;
96
+ border-width: 2px !important;
97
+ border-color: #f39c12 !important;
98
+ border-radius: 0.75rem !important;
99
+ transition: all 0.3s ease;
100
+ resize: vertical;
101
+ min-height: 90px;
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
+ /* Input focus effect */
112
  input:focus, select:focus, textarea:focus {
113
  outline: none !important;
114
+ box-shadow: 0 0 8px rgba(230, 126, 34, 0.6), 0 0 0 0.25rem rgba(230, 126, 34, 0.25) !important;
115
  border-color: #e67e22 !important;
116
  transform: scale(1.02);
117
  transition: all 0.3s ease;
118
  }
119
 
120
+ /* Icon shake on focus */
121
+ .input-group:focus-within .input-icon {
122
  animation: shake 0.5s ease-in-out;
123
  }
124
 
 
134
  opacity: 0.7;
135
  }
136
 
137
+ /* Button styling */
138
  .btn-warning {
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.25rem;
147
+ padding: 0.75rem 1rem;
148
+ box-shadow: 0 4px 12px rgba(231, 111, 32, 0.3);
149
  }
150
 
151
  .btn-warning::before {
 
157
  height: 100%;
158
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
159
  transition: left 0.5s;
160
+ border-radius: 0.75rem;
161
  }
162
 
163
  .btn-warning:hover::before {
 
166
 
167
  .btn-warning:hover {
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(-5px);
177
  transition: all 0.3s ease;
178
  }
179
 
180
+ /* Prediction result styling */
181
  .prediction-result {
182
  animation: slideInRight 0.6s ease-out;
183
  border: none;
184
  background: linear-gradient(135deg, #fff8f0, #ffe8cc);
185
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.1);
186
+ border-radius: 0.75rem;
187
+ padding: 1.5rem;
188
+ margin-top: 1.5rem;
189
+ color: #d35400;
190
+ font-weight: 600;
191
+ font-size: 1.25rem;
192
+ text-align: center;
193
  }
194
 
195
  @keyframes slideInRight {
 
203
  }
204
  }
205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  /* Responsive adjustments */
207
  @media (max-width: 576px) {
208
+ .main-card {
209
+ padding: 2rem 1.5rem 1.5rem;
 
210
  }
 
211
  h1 {
212
  font-size: 1.8rem !important;
213
  }
 
 
 
 
 
 
 
214
  .input-group input, .input-group select, .input-group textarea {
215
+ padding-left: 40px;
216
  }
 
217
  .input-group .input-icon {
218
+ left: 12px;
219
+ font-size: 1rem;
220
+ }
221
+ .btn-warning {
222
+ font-size: 1.1rem;
223
+ padding: 0.65rem 1rem;
224
  }
225
  }
226
  </style>
227
  </head>
228
  <body>
229
 
 
 
 
 
 
 
 
 
230
  <main>
231
+ <div class="card main-card shadow-lg animate__animated">
232
  <h1 class="text-center mb-5 text-4xl font-extrabold text-orange-600 animate__animated animate__bounceIn">
233
  <i class="fas fa-utensils me-2"></i>Indian Food Flavor Profile Prediction
234
  </h1>
 
240
  <label for="ingredients" class="form-label fw-semibold fs-6 text-secondary">
241
  <i class="fas fa-list me-1"></i>Ingredients (comma separated):
242
  </label>
243
+ <textarea id="ingredients" name="ingredients" rows="3" required placeholder="e.g., cumin, coriander, ginger" class="form-control"></textarea>
244
  <i class="fas fa-pepper-hot input-icon"></i>
245
  <div class="invalid-feedback">Please enter ingredients.</div>
246
  </div>
 
250
  <label for="diet" class="form-label fw-semibold fs-6 text-secondary">
251
  <i class="fas fa-leaf me-1"></i>Diet:
252
  </label>
253
+ <select id="diet" name="diet" required class="form-select">
254
  <option value="" disabled selected>Select diet</option>
255
  <option value="vegetarian">Vegetarian</option>
256
  <option value="non vegetarian">Non Vegetarian</option>
 
264
  <label for="course" class="form-label fw-semibold fs-6 text-secondary">
265
  <i class="fas fa-drumstick-bite me-1"></i>Course:
266
  </label>
267
+ <select id="course" name="course" required class="form-select">
268
  <option value="" disabled selected>Select course</option>
269
  <option value="dessert">Dessert</option>
270
  <option value="main course">Main Course</option>
 
280
  <label for="region" class="form-label fw-semibold fs-6 text-secondary">
281
  <i class="fas fa-map-marker-alt me-1"></i>Region:
282
  </label>
283
+ <select id="region" name="region" required class="form-select">
284
  <option value="" disabled selected>Select region</option>
285
  <option value="East">East</option>
286
  <option value="West">West</option>
 
293
 
294
  <!-- Prep & Cook Time -->
295
  <div class="row mb-4 g-3">
296
+ <div class="col-6 input-group">
297
  <label for="prep_time" class="form-label fw-semibold fs-6 text-secondary">
298
  <i class="fas fa-clock me-1"></i>Preparation Time (minutes):
299
  </label>
300
+ <input id="prep_time" type="number" name="prep_time" min="0" required placeholder="e.g., 15" class="form-control" />
301
+ <i class="fas fa-stopwatch input-icon"></i>
 
 
302
  <div class="invalid-feedback">Please enter preparation time.</div>
303
  </div>
304
+ <div class="col-6 input-group">
305
  <label for="cook_time" class="form-label fw-semibold fs-6 text-secondary">
306
  <i class="fas fa-fire me-1"></i>Cook Time (minutes):
307
  </label>
308
+ <input id="cook_time" type="number" name="cook_time" min="0" required placeholder="e.g., 30" class="form-control" />
309
+ <i class="fas fa-burn input-icon"></i>
 
 
310
  <div class="invalid-feedback">Please enter cook time.</div>
311
  </div>
312
  </div>
313
 
314
+ <button type="submit" class="btn btn-warning w-100 shadow-sm" id="submitBtn">
315
  <i class="fas fa-magic me-2"></i>Predict Flavor Profile
316
  </button>
317
  </form>
318
 
319
  {% if prediction %}
320
+ <div class="prediction-result">
321
  <i class="fas fa-star-and-crescent me-2"></i>Predicted Flavor Profile: {{ prediction }}
322
  </div>
323
  {% endif %}
 
325
  </main>
326
 
327
  <!-- Bootstrap JS Bundle -->
328
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.4.1/dist/js/bootstrap.bundle.min.js"></script>
329
+
330
+ <script>
331
+ // Bootstrap form validation
332
+ (() => {
333
+ 'use strict';
334
+ const forms = document.querySelectorAll('.needs-validation');
335
+ Array.from(forms).forEach(form => {
336
+ form.addEventListener('submit', event => {
337
+ if (!form.checkValidity()) {
338
+ event.preventDefault();
339
+ event.stopPropagation();
340
+ } else {
341
+ // Add loading state to button
342
+ const btn = document.getElementById('submitBtn');
343
+ btn.classList.add('btn-loading');
344
+ btn.innerHTML = '<span class="spinner-border spinner-border-sm me-2" role="status"></span> Predicting...';
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>