Update static/index.html
Browse files- static/index.html +236 -70
static/index.html
CHANGED
|
@@ -18,45 +18,87 @@
|
|
| 18 |
margin: 0;
|
| 19 |
}
|
| 20 |
#cont {
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
#prompt {
|
| 30 |
flex-grow: 1;
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
}
|
| 40 |
-
#cont button {
|
| 41 |
-
padding: 2.5vh 4.6vh;
|
| 42 |
-
margin: 1vh;
|
| 43 |
-
background: linear-gradient(145deg, rgb(0, 149, 249), #ff0095, rgb(255, 0, 43));
|
| 44 |
-
border: none;
|
| 45 |
-
border-radius: 8px;
|
| 46 |
-
color: #fff;
|
| 47 |
-
cursor: pointer;
|
| 48 |
}
|
| 49 |
-
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
}
|
|
|
|
|
|
|
|
|
|
| 52 |
.container {
|
| 53 |
text-align: center;
|
| 54 |
}
|
| 55 |
|
| 56 |
h1 {
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
| 60 |
}
|
| 61 |
#inputs {
|
| 62 |
flex-grow: 1;
|
|
@@ -80,7 +122,7 @@
|
|
| 80 |
}
|
| 81 |
|
| 82 |
.image-box {
|
| 83 |
-
width:
|
| 84 |
height: 200px; /* Adjust the height as needed */
|
| 85 |
border: 2px solid #ffffff; /* Set the border color to white */
|
| 86 |
border-radius: 10px;
|
|
@@ -130,8 +172,8 @@
|
|
| 130 |
}
|
| 131 |
#image-box {
|
| 132 |
border: 2px solid blue;
|
| 133 |
-
width:
|
| 134 |
-
height:
|
| 135 |
display: flex;
|
| 136 |
flex-direction: column;
|
| 137 |
overflow-y: scroll;
|
|
@@ -146,20 +188,57 @@
|
|
| 146 |
}
|
| 147 |
|
| 148 |
#image-box p {
|
| 149 |
-
|
| 150 |
font-size: 20px;
|
| 151 |
color: white;
|
|
|
|
| 152 |
}
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
#advanced-options {
|
| 164 |
flex-grow: 1;
|
| 165 |
padding: 10px;
|
|
@@ -177,6 +256,7 @@
|
|
| 177 |
display: none;
|
| 178 |
align-items: center;
|
| 179 |
border: 2px solid rgb(247, 6, 187);
|
|
|
|
| 180 |
}
|
| 181 |
#advanced-options label, #advanced-options input {
|
| 182 |
margin: 10px;
|
|
@@ -189,19 +269,93 @@
|
|
| 189 |
}
|
| 190 |
#advanced-options button {
|
| 191 |
padding: 10px 20px;
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 198 |
|
| 199 |
}
|
| 200 |
#advanced-options button:hover {
|
| 201 |
background: linear-gradient(145deg, #00ffab, #4e00f9, rgb(255, 0, 43));
|
| 202 |
}
|
| 203 |
|
| 204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 205 |
</style>
|
| 206 |
</head>
|
| 207 |
<body>
|
|
@@ -209,27 +363,29 @@
|
|
| 209 |
<h1>Aiconvert.online </h1>
|
| 210 |
|
| 211 |
<div id="cont">
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
<input type="text" id="prompt" name="prompt">
|
| 215 |
-
|
| 216 |
<br>
|
| 217 |
-
|
| 218 |
-
<button onclick="generatePrompts()">Generate Prompts</button>
|
| 219 |
-
<div id="promptSpinner" class="spinner" style="display: none;"></div>
|
| 220 |
-
</div>
|
| 221 |
</div>
|
| 222 |
-
<br>
|
| 223 |
-
<div id="cont">
|
| 224 |
<div>
|
| 225 |
-
<
|
| 226 |
-
|
| 227 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 228 |
<br>
|
| 229 |
-
|
| 230 |
-
<button onclick="sendInputs()">generate image </button>
|
| 231 |
-
<div id="sendSpinner" class="spinner" style="display: none;"></div>
|
| 232 |
-
</div>
|
| 233 |
</div>
|
| 234 |
<br>
|
| 235 |
<button id="showadv" onclick="toggleAdvancedOptions()">Advanced Options</button>
|
|
@@ -254,12 +410,17 @@
|
|
| 254 |
<span id="noise-level-value">0</span>
|
| 255 |
|
| 256 |
<br>
|
| 257 |
-
<button onclick="toggleAdvancedOptions()">Hide
|
| 258 |
</div>
|
| 259 |
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 260 |
<div id="output-container" class="image-container">
|
| 261 |
<div id="image-box" class="image-box">
|
| 262 |
-
<p>Your Generated
|
|
|
|
| 263 |
</div>
|
| 264 |
</div>
|
| 265 |
</div>
|
|
@@ -296,6 +457,9 @@ function sendInputs() {
|
|
| 296 |
return;
|
| 297 |
}
|
| 298 |
|
|
|
|
|
|
|
|
|
|
| 299 |
showSpinner('sendSpinner');
|
| 300 |
const noiseLevel = document.getElementById("noise_level").value;
|
| 301 |
const isNegative = document.getElementById("is_negative").value;
|
|
@@ -311,6 +475,7 @@ function sendInputs() {
|
|
| 311 |
})
|
| 312 |
.then(data => {
|
| 313 |
const imageBox = document.getElementById("image-box");
|
|
|
|
| 314 |
const img = new Image();
|
| 315 |
img.src = 'data:image/jpeg;base64,' + data.image_base64;
|
| 316 |
const maxWidth = 200;
|
|
@@ -326,11 +491,12 @@ function sendInputs() {
|
|
| 326 |
.catch(error => {
|
| 327 |
console.error('Error:', error);
|
| 328 |
const imageBox = document.getElementById("image-box");
|
| 329 |
-
imageBox.innerHTML =
|
| 330 |
hideSpinner('sendSpinner');
|
| 331 |
});
|
| 332 |
}
|
| 333 |
|
|
|
|
| 334 |
function toggleAdvancedOptions() {
|
| 335 |
const advancedOptions = document.getElementById("advanced-options");
|
| 336 |
if (advancedOptions.style.display === "none") {
|
|
|
|
| 18 |
margin: 0;
|
| 19 |
}
|
| 20 |
#cont {
|
| 21 |
+
border: 2px solid blue;
|
| 22 |
+
width: 265px;
|
| 23 |
+
height: 50px;
|
| 24 |
+
display: flex;
|
| 25 |
+
flex-direction: column;
|
| 26 |
+
overflow-y: scroll;
|
| 27 |
+
margin: auto;
|
| 28 |
+
margin-top: 30px;
|
| 29 |
+
padding-bottom: 7px;
|
| 30 |
+
gap: 14px;
|
| 31 |
+
background: linear-gradient(black , black) padding-box,
|
| 32 |
+
linear-gradient(to right, red, blue) border-box;
|
| 33 |
+
border-radius: 20px;
|
| 34 |
+
border: 2.5px solid transparent;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
#prompt {
|
| 38 |
flex-grow: 1;
|
| 39 |
+
padding: 10px;
|
| 40 |
+
margin: 10px;
|
| 41 |
+
background: transparent;
|
| 42 |
+
border: none;
|
| 43 |
+
border-radius: 8px;
|
| 44 |
+
box-shadow: linear-gradient(145deg, rgb(0, 249, 153), #ff002b);
|
| 45 |
+
color: #fff;
|
| 46 |
+
outline: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
}
|
| 48 |
+
#generatePrompts {
|
| 49 |
+
background-image: linear-gradient(
|
| 50 |
+
45deg,
|
| 51 |
+
hsl(240deg 75% 29%) 0%,
|
| 52 |
+
hsl(254deg 78% 28%) 6%,
|
| 53 |
+
hsl(264deg 82% 27%) 13%,
|
| 54 |
+
hsl(272deg 87% 26%) 19%,
|
| 55 |
+
hsl(278deg 93% 25%) 25%,
|
| 56 |
+
hsl(284deg 98% 24%) 31%,
|
| 57 |
+
hsl(289deg 100% 23%) 37%,
|
| 58 |
+
hsl(294deg 100% 23%) 44%,
|
| 59 |
+
hsl(299deg 100% 22%) 50%,
|
| 60 |
+
hsl(303deg 100% 23%) 56%,
|
| 61 |
+
hsl(307deg 100% 24%) 63%,
|
| 62 |
+
hsl(311deg 100% 25%) 69%,
|
| 63 |
+
hsl(313deg 100% 26%) 75%,
|
| 64 |
+
hsl(316deg 95% 28%) 81%,
|
| 65 |
+
hsl(320deg 88% 30%) 87%,
|
| 66 |
+
hsl(323deg 81% 32%) 94%,
|
| 67 |
+
hsl(326deg 75% 33%) 100%
|
| 68 |
+
);
|
| 69 |
+
border: none;
|
| 70 |
+
color: white;
|
| 71 |
+
padding: 10px 20px;
|
| 72 |
+
text-align: center;
|
| 73 |
+
text-decoration: none;
|
| 74 |
+
display: inline-block;
|
| 75 |
+
font-size: 16px;
|
| 76 |
+
margin-top: 10px;
|
| 77 |
+
cursor: pointer;
|
| 78 |
+
border-radius: 5px;
|
| 79 |
+
display: block;
|
| 80 |
+
margin: 0 auto;
|
| 81 |
+
width: 200px;
|
| 82 |
+
}
|
| 83 |
+
#generatePrompts:hover {
|
| 84 |
+
/* Hover effect for the button */
|
| 85 |
+
|
| 86 |
+
background-color: #45a049;
|
| 87 |
+
}
|
| 88 |
}
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
|
| 92 |
.container {
|
| 93 |
text-align: center;
|
| 94 |
}
|
| 95 |
|
| 96 |
h1 {
|
| 97 |
+
text-align: center;
|
| 98 |
+
margin-bottom: 20px;
|
| 99 |
+
font-family: 'Barlow Condensed';
|
| 100 |
+
color: pink;
|
| 101 |
+
font-size: 40px; /* Adjust the font size as needed */
|
| 102 |
}
|
| 103 |
#inputs {
|
| 104 |
flex-grow: 1;
|
|
|
|
| 122 |
}
|
| 123 |
|
| 124 |
.image-box {
|
| 125 |
+
width: 100px; /* Adjust the width as needed */
|
| 126 |
height: 200px; /* Adjust the height as needed */
|
| 127 |
border: 2px solid #ffffff; /* Set the border color to white */
|
| 128 |
border-radius: 10px;
|
|
|
|
| 172 |
}
|
| 173 |
#image-box {
|
| 174 |
border: 2px solid blue;
|
| 175 |
+
width: 265px;
|
| 176 |
+
height: 300px;
|
| 177 |
display: flex;
|
| 178 |
flex-direction: column;
|
| 179 |
overflow-y: scroll;
|
|
|
|
| 188 |
}
|
| 189 |
|
| 190 |
#image-box p {
|
| 191 |
+
|
| 192 |
font-size: 20px;
|
| 193 |
color: white;
|
| 194 |
+
text-align :center ;
|
| 195 |
}
|
| 196 |
+
#showadv {
|
| 197 |
+
padding: 10px 20px;
|
| 198 |
+
/* Auto margin for centering horizontally */
|
| 199 |
+
background-image: linear-gradient(
|
| 200 |
+
45deg,
|
| 201 |
+
hsl(240deg 75% 29%) 0%,
|
| 202 |
+
hsl(254deg 78% 28%) 6%,
|
| 203 |
+
hsl(264deg 82% 27%) 13%,
|
| 204 |
+
hsl(272deg 87% 26%) 19%,
|
| 205 |
+
hsl(278deg 93% 25%) 25%,
|
| 206 |
+
hsl(284deg 98% 24%) 31%,
|
| 207 |
+
hsl(289deg 100% 23%) 37%,
|
| 208 |
+
hsl(294deg 100% 23%) 44%,
|
| 209 |
+
hsl(299deg 100% 22%) 50%,
|
| 210 |
+
hsl(303deg 100% 23%) 56%,
|
| 211 |
+
hsl(307deg 100% 24%) 63%,
|
| 212 |
+
hsl(311deg 100% 25%) 69%,
|
| 213 |
+
hsl(313deg 100% 26%) 75%,
|
| 214 |
+
hsl(316deg 95% 28%) 81%,
|
| 215 |
+
hsl(320deg 88% 30%) 87%,
|
| 216 |
+
hsl(323deg 81% 32%) 94%,
|
| 217 |
+
hsl(326deg 75% 33%) 100%
|
| 218 |
+
);
|
| 219 |
+
border: none;
|
| 220 |
+
border-radius: 8px;
|
| 221 |
+
cursor: pointer;
|
| 222 |
+
color: #fff;
|
| 223 |
+
text-align: center;
|
| 224 |
+
display: inline-block;
|
| 225 |
+
margin: 0 auto;
|
| 226 |
+
width: 200px;
|
| 227 |
+
border: none;
|
| 228 |
+
color: white;
|
| 229 |
+
padding: 10px 20px;
|
| 230 |
+
text-align: center;
|
| 231 |
+
text-decoration: none;
|
| 232 |
+
display: inline-block;
|
| 233 |
+
font-size: 16px;
|
| 234 |
+
margin-top: 10px;
|
| 235 |
+
cursor: pointer;
|
| 236 |
+
border-radius: 5px;
|
| 237 |
+
display: block;
|
| 238 |
+
margin: 0 auto;
|
| 239 |
+
width: 200px;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
#advanced-options {
|
| 243 |
flex-grow: 1;
|
| 244 |
padding: 10px;
|
|
|
|
| 256 |
display: none;
|
| 257 |
align-items: center;
|
| 258 |
border: 2px solid rgb(247, 6, 187);
|
| 259 |
+
text-align :center ;
|
| 260 |
}
|
| 261 |
#advanced-options label, #advanced-options input {
|
| 262 |
margin: 10px;
|
|
|
|
| 269 |
}
|
| 270 |
#advanced-options button {
|
| 271 |
padding: 10px 20px;
|
| 272 |
+
/* Auto margin for centering horizontally */
|
| 273 |
+
background-image: linear-gradient(
|
| 274 |
+
45deg,
|
| 275 |
+
hsl(240deg 75% 29%) 0%,
|
| 276 |
+
hsl(254deg 78% 28%) 6%,
|
| 277 |
+
hsl(264deg 82% 27%) 13%,
|
| 278 |
+
hsl(272deg 87% 26%) 19%,
|
| 279 |
+
hsl(278deg 93% 25%) 25%,
|
| 280 |
+
hsl(284deg 98% 24%) 31%,
|
| 281 |
+
hsl(289deg 100% 23%) 37%,
|
| 282 |
+
hsl(294deg 100% 23%) 44%,
|
| 283 |
+
hsl(299deg 100% 22%) 50%,
|
| 284 |
+
hsl(303deg 100% 23%) 56%,
|
| 285 |
+
hsl(307deg 100% 24%) 63%,
|
| 286 |
+
hsl(311deg 100% 25%) 69%,
|
| 287 |
+
hsl(313deg 100% 26%) 75%,
|
| 288 |
+
hsl(316deg 95% 28%) 81%,
|
| 289 |
+
hsl(320deg 88% 30%) 87%,
|
| 290 |
+
hsl(323deg 81% 32%) 94%,
|
| 291 |
+
hsl(326deg 75% 33%) 100%
|
| 292 |
+
);
|
| 293 |
+
border: none;
|
| 294 |
+
border-radius: 8px;
|
| 295 |
+
cursor: pointer;
|
| 296 |
+
color: #fff;
|
| 297 |
+
text-align: center;
|
| 298 |
+
display: inline-block;
|
| 299 |
+
margin: 0 auto;
|
| 300 |
+
width: 50px;
|
| 301 |
+
border: none;
|
| 302 |
+
color: white;
|
| 303 |
+
padding: 10px 20px;
|
| 304 |
+
text-align: center;
|
| 305 |
+
text-decoration: none;
|
| 306 |
+
display: inline-block;
|
| 307 |
+
font-size: 16px;
|
| 308 |
+
margin-top: 10px;
|
| 309 |
+
cursor: pointer;
|
| 310 |
+
border-radius: 5px;
|
| 311 |
+
display: block;
|
| 312 |
+
margin: 0 auto;
|
| 313 |
+
width: 200px;
|
| 314 |
|
| 315 |
}
|
| 316 |
#advanced-options button:hover {
|
| 317 |
background: linear-gradient(145deg, #00ffab, #4e00f9, rgb(255, 0, 43));
|
| 318 |
}
|
| 319 |
|
| 320 |
+
#generate {
|
| 321 |
+
background-image: linear-gradient(
|
| 322 |
+
45deg,
|
| 323 |
+
hsl(240deg 75% 29%) 0%,
|
| 324 |
+
hsl(254deg 78% 28%) 6%,
|
| 325 |
+
hsl(264deg 82% 27%) 13%,
|
| 326 |
+
hsl(272deg 87% 26%) 19%,
|
| 327 |
+
hsl(278deg 93% 25%) 25%,
|
| 328 |
+
hsl(284deg 98% 24%) 31%,
|
| 329 |
+
hsl(289deg 100% 23%) 37%,
|
| 330 |
+
hsl(294deg 100% 23%) 44%,
|
| 331 |
+
hsl(299deg 100% 22%) 50%,
|
| 332 |
+
hsl(303deg 100% 23%) 56%,
|
| 333 |
+
hsl(307deg 100% 24%) 63%,
|
| 334 |
+
hsl(311deg 100% 25%) 69%,
|
| 335 |
+
hsl(313deg 100% 26%) 75%,
|
| 336 |
+
hsl(316deg 95% 28%) 81%,
|
| 337 |
+
hsl(320deg 88% 30%) 87%,
|
| 338 |
+
hsl(323deg 81% 32%) 94%,
|
| 339 |
+
hsl(326deg 75% 33%) 100%
|
| 340 |
+
);
|
| 341 |
+
border: none;
|
| 342 |
+
color: white;
|
| 343 |
+
padding: 10px 20px;
|
| 344 |
+
text-align: center;
|
| 345 |
+
text-decoration: none;
|
| 346 |
+
display: inline-block;
|
| 347 |
+
font-size: 16px;
|
| 348 |
+
margin-top: 10px;
|
| 349 |
+
cursor: pointer;
|
| 350 |
+
border-radius: 5px;
|
| 351 |
+
display: block;
|
| 352 |
+
margin: 0 auto;
|
| 353 |
+
width: 200px;
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
#generate:hover {
|
| 357 |
+
background-color: #45a049; /* Hover effect */
|
| 358 |
+
}
|
| 359 |
</style>
|
| 360 |
</head>
|
| 361 |
<body>
|
|
|
|
| 363 |
<h1>Aiconvert.online </h1>
|
| 364 |
|
| 365 |
<div id="cont">
|
| 366 |
+
|
| 367 |
+
|
| 368 |
+
<input type="text" id="prompt" name="prompt"placeholder="Enter Text Idea">
|
| 369 |
+
|
| 370 |
<br>
|
| 371 |
+
|
|
|
|
|
|
|
|
|
|
| 372 |
</div>
|
|
|
|
|
|
|
| 373 |
<div>
|
| 374 |
+
<button id="generatePrompts" onclick="generatePrompts()">Generate Prompts</button>
|
| 375 |
+
|
| 376 |
</div>
|
| 377 |
+
<br>
|
| 378 |
+
<div id="cont" style="position: relative;">
|
| 379 |
+
<div>
|
| 380 |
+
<div id="promptSpinner" class="spinner" style="display: none;"></div>
|
| 381 |
+
|
| 382 |
+
<input type="text" id="inputs" name="inputs" placeholder="Enter prompt" >
|
| 383 |
+
</div>
|
| 384 |
+
|
| 385 |
+
|
| 386 |
+
|
| 387 |
<br>
|
| 388 |
+
|
|
|
|
|
|
|
|
|
|
| 389 |
</div>
|
| 390 |
<br>
|
| 391 |
<button id="showadv" onclick="toggleAdvancedOptions()">Advanced Options</button>
|
|
|
|
| 410 |
<span id="noise-level-value">0</span>
|
| 411 |
|
| 412 |
<br>
|
| 413 |
+
<button onclick="toggleAdvancedOptions()">Hide </button>
|
| 414 |
</div>
|
| 415 |
<br>
|
| 416 |
+
<div>
|
| 417 |
+
<button id="generate" onclick="sendInputs()">generate image </button>
|
| 418 |
+
|
| 419 |
+
</div>
|
| 420 |
<div id="output-container" class="image-container">
|
| 421 |
<div id="image-box" class="image-box">
|
| 422 |
+
<p>Your Generated Image Will Appear Here</p>
|
| 423 |
+
<div id="sendSpinner" class="spinner" style="display: none;"></div>
|
| 424 |
</div>
|
| 425 |
</div>
|
| 426 |
</div>
|
|
|
|
| 457 |
return;
|
| 458 |
}
|
| 459 |
|
| 460 |
+
const imageBox = document.getElementById("image-box");
|
| 461 |
+
imageBox.innerHTML = ""; // Clear previous content
|
| 462 |
+
|
| 463 |
showSpinner('sendSpinner');
|
| 464 |
const noiseLevel = document.getElementById("noise_level").value;
|
| 465 |
const isNegative = document.getElementById("is_negative").value;
|
|
|
|
| 475 |
})
|
| 476 |
.then(data => {
|
| 477 |
const imageBox = document.getElementById("image-box");
|
| 478 |
+
imageBox.innerHTML = ""; // Clear previous content
|
| 479 |
const img = new Image();
|
| 480 |
img.src = 'data:image/jpeg;base64,' + data.image_base64;
|
| 481 |
const maxWidth = 200;
|
|
|
|
| 491 |
.catch(error => {
|
| 492 |
console.error('Error:', error);
|
| 493 |
const imageBox = document.getElementById("image-box");
|
| 494 |
+
imageBox.innerHTML = '<p style="color:white;">An error occurred. Please try again later.</p>';
|
| 495 |
hideSpinner('sendSpinner');
|
| 496 |
});
|
| 497 |
}
|
| 498 |
|
| 499 |
+
|
| 500 |
function toggleAdvancedOptions() {
|
| 501 |
const advancedOptions = document.getElementById("advanced-options");
|
| 502 |
if (advancedOptions.style.display === "none") {
|