Update static/index.html
Browse files- static/index.html +1 -4
static/index.html
CHANGED
|
@@ -457,7 +457,6 @@ function sendInputs() {
|
|
| 457 |
return;
|
| 458 |
}
|
| 459 |
|
| 460 |
-
|
| 461 |
showSpinner('sendSpinner');
|
| 462 |
const noiseLevel = document.getElementById("noise_level").value;
|
| 463 |
const isNegative = document.getElementById("is_negative").value;
|
|
@@ -473,7 +472,6 @@ function sendInputs() {
|
|
| 473 |
})
|
| 474 |
.then(data => {
|
| 475 |
const imageBox = document.getElementById("image-box");
|
| 476 |
-
imageBox.innerHTML = ""; // Clear previous content
|
| 477 |
const img = new Image();
|
| 478 |
img.src = 'data:image/jpeg;base64,' + data.image_base64;
|
| 479 |
const maxWidth = 200;
|
|
@@ -489,12 +487,11 @@ function sendInputs() {
|
|
| 489 |
.catch(error => {
|
| 490 |
console.error('Error:', error);
|
| 491 |
const imageBox = document.getElementById("image-box");
|
| 492 |
-
imageBox.innerHTML =
|
| 493 |
hideSpinner('sendSpinner');
|
| 494 |
});
|
| 495 |
}
|
| 496 |
|
| 497 |
-
|
| 498 |
function toggleAdvancedOptions() {
|
| 499 |
const advancedOptions = document.getElementById("advanced-options");
|
| 500 |
if (advancedOptions.style.display === "none") {
|
|
|
|
| 457 |
return;
|
| 458 |
}
|
| 459 |
|
|
|
|
| 460 |
showSpinner('sendSpinner');
|
| 461 |
const noiseLevel = document.getElementById("noise_level").value;
|
| 462 |
const isNegative = document.getElementById("is_negative").value;
|
|
|
|
| 472 |
})
|
| 473 |
.then(data => {
|
| 474 |
const imageBox = document.getElementById("image-box");
|
|
|
|
| 475 |
const img = new Image();
|
| 476 |
img.src = 'data:image/jpeg;base64,' + data.image_base64;
|
| 477 |
const maxWidth = 200;
|
|
|
|
| 487 |
.catch(error => {
|
| 488 |
console.error('Error:', error);
|
| 489 |
const imageBox = document.getElementById("image-box");
|
| 490 |
+
imageBox.innerHTML = "<p>An error occurred. Please try again later.</p>";
|
| 491 |
hideSpinner('sendSpinner');
|
| 492 |
});
|
| 493 |
}
|
| 494 |
|
|
|
|
| 495 |
function toggleAdvancedOptions() {
|
| 496 |
const advancedOptions = document.getElementById("advanced-options");
|
| 497 |
if (advancedOptions.style.display === "none") {
|