Spaces:
Sleeping
Sleeping
File size: 17,312 Bytes
2b5c125 13d2291 2b5c125 c8ffcee |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LE-3 Models</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
background: #000000;
min-height: 100vh;
overflow-x: hidden;
}
/* Landing Page Styles */
.landing-page {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
text-align: center;
color: white;
position: relative;
}
.logo-container {
margin-bottom: 30px;
animation: fadeInUp 1s ease-out;
}
.logo {
width: 200px;
height: 200px;
object-fit: contain;
border-radius: 20px;
box-shadow: 0 10px 30px rgba(255,255,255,0.3);
background: black;
padding: 20px;
}
.hero-title {
font-size: 3.5em;
font-weight: bold;
margin-bottom: 20px;
text-shadow: 2px 2px 4px rgb(255, 255, 255);
animation: fadeInUp 1s ease-out 0.3s both;
}
.hero-subtitle {
font-size: 1.3em;
margin-bottom: 40px;
opacity: 0.9;
animation: fadeInUp 1s ease-out 0.6s both;
}
.start-button {
background: #ffffff;
color: #000000;
border: 2px solid #ffffff;
padding: 20px 50px;
font-size: 1.2em;
font-weight: bold;
border-radius: 50px;
cursor: pointer;
box-shadow: 0 10px 30px rgba(255,255,255,0.3);
transition: all 0.3s ease;
animation: fadeInUp 1s ease-out 0.9s both;
}
.start-button:hover {
background: #000000;
color: #ffffff;
transform: translateY(-5px);
box-shadow: 0 15px 40px rgba(255,255,255,0.4);
}
/* Image Gallery Styles */
.gallery-container {
margin-top: 80px;
width: 100%;
overflow: hidden;
position: relative;
}
.gallery-row {
display: flex;
width: 200%;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
.gallery-row.row-1 {
animation: scrollRight 20s linear infinite;
margin-bottom: 20px;
}
.gallery-row.row-2 {
animation: scrollLeft 25s linear infinite;
}
.gallery-image {
width: 150px;
height: 150px;
object-fit: cover;
border-radius: 15px;
margin: 0 15px;
box-shadow: 0 5px 15px rgba(255,255,255,0.3);
transition: transform 0.3s ease;
}
.gallery-image:hover {
transform: scale(1.1);
}
/* Animation Keyframes */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(50px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes scrollRight {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(0);
}
}
@keyframes scrollLeft {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-100%);
}
}
/* Generation UI Styles */
.generation-ui {
display: none;
min-height: 100vh;
background: #000000;
padding: 20px;
}
.header {
background: #ffffff;
color: #000000;
padding: 20px;
border-radius: 15px;
box-shadow: 0 5px 20px rgba(255,255,255,0.1);
margin-bottom: 30px;
display: flex;
align-items: center;
justify-content: space-between;
}
.header-logo {
width: 60px;
height: 60px;
object-fit: contain;
}
.back-button {
background: #000000;
color: #ffffff;
border: 2px solid #000000;
padding: 10px 20px;
border-radius: 25px;
cursor: pointer;
font-size: 14px;
transition: all 0.3s ease;
}
.back-button:hover {
background: #ffffff;
color: #000000;
}
.container {
max-width: 1000px;
margin: 0 auto;
background: #ffffff;
color: #000000;
padding: 40px;
border-radius: 20px;
box-shadow: 0 10px 30px rgba(255,255,255,0.1);
}
h1 {
color: #000000;
margin-bottom: 30px;
font-size: 2.5em;
text-align: center;
}
.form-group {
margin-bottom: 25px;
text-align: left;
}
label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: #000000;
}
select, input, button {
width: 100%;
padding: 15px;
font-size: 16px;
border-radius: 10px;
border: 2px solid #000000;
background: #ffffff;
color: #000000;
transition: border-color 0.3s ease;
}
select:focus, input:focus {
outline: none;
border-color: #000000;
box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}
.generate-button {
background: #000000;
color: #ffffff;
border: 2px solid #000000;
cursor: pointer;
font-weight: bold;
margin-top: 20px;
transition: all 0.3s ease;
}
.generate-button:hover {
background: #ffffff;
color: #000000;
transform: translateY(-2px);
}
#prompt {
min-height: 100px;
resize: vertical;
}
#output {
margin-top: 30px;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 20px;
}
.output-image {
max-width: 250px;
border-radius: 15px;
box-shadow: 0 10px 25px rgba(255,255,255,0.2);
transition: transform 0.3s ease;
}
.output-image:hover {
transform: scale(1.05);
}
.error {
color: #ffffff;
background: #000000;
margin-top: 15px;
padding: 15px;
border-radius: 10px;
border: 2px solid #ffffff;
}
.loading {
display: none;
margin-top: 20px;
text-align: center;
font-style: italic;
color: #ffffff;
font-size: 1.1em;
}
.loading::after {
content: '';
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid #ffffff;
border-top: 3px solid transparent;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-left: 10px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Responsive Design */
@media (max-width: 768px) {
.hero-title {
font-size: 2.5em;
}
.logo {
width: 150px;
height: 150px;
}
.container {
padding: 20px;
}
.gallery-image {
width: 100px;
height: 100px;
}
}
</style>
</head>
<body>
<!-- Landing Page -->
<div id="landing-page" class="landing-page">
<div class="logo-container">
<img src="/assets/logo.png" alt="AI Studio Logo" class="logo">
</div>
<h1 class="hero-title"></h1>
<p class="hero-subtitle"></p>
<button class="start-button" onclick="showGenerationUI()">Start Creating</button>
<!-- Image Gallery -->
<div class="gallery-container">
<div class="gallery-row row-1">
<img src="/assets/image (1).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (2).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (3).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (4).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (5).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (6).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (7).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (8).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (9).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (10).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (11).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (12).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (13).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (14).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (15).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (16).png" alt="Gallery Image" class="gallery-image">
</div>
<div class="gallery-row row-2">
<img src="/assets/image (1).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (2).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (3).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (4).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (5).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (6).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (7).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (8).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (9).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (10).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (11).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (12).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (13).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (14).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (15).png" alt="Gallery Image" class="gallery-image">
<img src="/assets/image (16).png" alt="Gallery Image" class="gallery-image">
</div>
</div>
</div>
<!-- Generation UI -->
<div id="generation-ui" class="generation-ui">
<div class="header">
<img src="/assets/logo.png" alt="Logo" class="header-logo">
<h2></h2>
<button class="back-button" onclick="showLandingPage()">← Back to Home</button>
</div>
<div class="container">
<h1>Create Your Images</h1>
<div class="form-group">
<label for="model-select">Select Model:</label>
<select id="model-select">
<option value="ssd-1b">SSD-1B</option>
<option value="sd-v1-5">Stable Diffusion v1-5</option>
</select>
</div>
<div class="form-group">
<label for="ratio-select">Image Ratio:</label>
<select id="ratio-select">
<option value="1:1">1:1 (Square)</option>
<option value="3:4">3:4 (Portrait)</option>
<option value="16:9">16:9 (Landscape)</option>
</select>
</div>
<div class="form-group">
<label for="num-images">Number of Images (1-4):</label>
<input type="number" id="num-images" min="1" max="4" value="1">
</div>
<div class="form-group">
<label for="prompt">Describe your image:</label>
<textarea id="prompt" placeholder="Enter a detailed description of the image you want to generate..."></textarea>
</div>
<div class="form-group">
<label for="guidance-scale">Guidance Scale (1-20):</label>
<input type="number" id="guidance-scale" min="1" max="20" step="0.5" value="7.5">
</div>
<button class="generate-button" onclick="generateImages()">Generate Images</button>
<div id="loading" class="loading">Generating your images, please wait...</div>
<div id="error" class="error"></div>
<div id="output"></div>
</div>
</div>
<script>
function showGenerationUI() {
document.getElementById('landing-page').style.display = 'none';
document.getElementById('generation-ui').style.display = 'block';
}
function showLandingPage() {
document.getElementById('generation-ui').style.display = 'none';
document.getElementById('landing-page').style.display = 'flex';
}
async function generateImages() {
const model = document.getElementById('model-select').value;
const ratio = document.getElementById('ratio-select').value;
const numImages = document.getElementById('num-images').value;
const prompt = document.getElementById('prompt').value;
const guidanceScale = document.getElementById('guidance-scale').value;
const outputDiv = document.getElementById('output');
const errorDiv = document.getElementById('error');
const loadingDiv = document.getElementById('loading');
if (!prompt.trim()) {
errorDiv.innerText = 'Please enter a prompt to generate images.';
return;
}
outputDiv.innerHTML = '';
errorDiv.innerText = '';
loadingDiv.style.display = 'block';
try {
const response = await fetch('/generate', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
model,
prompt,
ratio,
num_images: numImages,
guidance_scale: guidanceScale
})
});
loadingDiv.style.display = 'none';
const data = await response.json();
if (response.ok) {
data.images.forEach(imgSrc => {
const img = document.createElement('img');
img.src = imgSrc;
img.className = 'output-image';
img.alt = 'Generated Image';
outputDiv.appendChild(img);
});
} else {
errorDiv.innerText = data.error || 'Failed to generate images. Please try again.';
}
} catch (error) {
loadingDiv.style.display = 'none';
errorDiv.innerText = 'Error: ' + error.message;
}
}
// Add some interactive effects
document.addEventListener('DOMContentLoaded', function() {
// Add parallax effect to gallery images
const galleryImages = document.querySelectorAll('.gallery-image');
galleryImages.forEach(img => {
img.addEventListener('mouseenter', function() {
this.style.animationPlayState = 'paused';
});
img.addEventListener('mouseleave', function() {
this.style.animationPlayState = 'running';
});
});
});
</script>
</body>
</html> |