Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +21 -2
templates/index.html
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
<!-- templates/index.html -->
|
2 |
<!DOCTYPE html>
|
3 |
<html lang="en">
|
4 |
<head>
|
@@ -120,6 +119,18 @@
|
|
120 |
</div>
|
121 |
</div>
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
<footer class="bg-dark text-white text-center py-3">
|
124 |
<div class="container">
|
125 |
<p class="mb-0">Plant Disease Detector © 2025 | Powered by Gemini AI</p>
|
@@ -138,6 +149,14 @@
|
|
138 |
};
|
139 |
reader.readAsDataURL(event.target.files[0]);
|
140 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
</script>
|
142 |
</body>
|
143 |
-
</html>
|
|
|
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="en">
|
3 |
<head>
|
|
|
119 |
</div>
|
120 |
</div>
|
121 |
|
122 |
+
<!-- Loading Overlay -->
|
123 |
+
<div id="loadingOverlay" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.8); z-index: 1050; align-items: center; justify-content: center;">
|
124 |
+
<div class="text-center">
|
125 |
+
<div class="spinner-border text-success" role="status" style="width: 4rem; height: 4rem;">
|
126 |
+
<span class="visually-hidden">Loading...</span>
|
127 |
+
</div>
|
128 |
+
<div class="mt-3">
|
129 |
+
<h4>Processing, please wait...</h4>
|
130 |
+
</div>
|
131 |
+
</div>
|
132 |
+
</div>
|
133 |
+
|
134 |
<footer class="bg-dark text-white text-center py-3">
|
135 |
<div class="container">
|
136 |
<p class="mb-0">Plant Disease Detector © 2025 | Powered by Gemini AI</p>
|
|
|
149 |
};
|
150 |
reader.readAsDataURL(event.target.files[0]);
|
151 |
}
|
152 |
+
|
153 |
+
// Show loading overlay on form submit
|
154 |
+
document.addEventListener("DOMContentLoaded", function() {
|
155 |
+
const form = document.querySelector("form");
|
156 |
+
form.addEventListener("submit", function() {
|
157 |
+
document.getElementById("loadingOverlay").style.display = "flex";
|
158 |
+
});
|
159 |
+
});
|
160 |
</script>
|
161 |
</body>
|
162 |
+
</html>
|