tchung1970 Claude Opus 4.5 commited on
Commit
fec0f1f
·
1 Parent(s): e3b7665

Fix UI to match Z-Image exactly

Browse files

- Title changed to "FLUX.2-Image"
- Added default prompt value (Empire State Building example)
- Output section now has white background (#ffffff) like Z-Image
- Updated textbox to 20 lines
- Fixed dark mode for output section

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +19 -11
app.py CHANGED
@@ -373,21 +373,23 @@ button.primary:hover {
373
  background: #0077ed !important;
374
  }
375
 
376
- /* Output Section */
377
- .output-section {
378
- background: #1d1d1f !important;
379
  border-radius: 18px !important;
380
  padding: 32px !important;
381
- box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4) !important;
382
  overflow: hidden !important;
383
  display: flex !important;
384
  align-items: center !important;
385
  justify-content: center !important;
386
  min-height: 80vh !important;
387
  max-height: 90vh !important;
388
- flex: 1 1 auto !important;
389
  will-change: auto !important;
390
  position: relative !important;
 
 
 
391
  }
392
 
393
  .output-section * {
@@ -404,6 +406,8 @@ button.primary:hover {
404
  height: auto !important;
405
  object-fit: contain !important;
406
  transform: none !important;
 
 
407
  backface-visibility: hidden !important;
408
  -webkit-backface-visibility: hidden !important;
409
  }
@@ -416,8 +420,6 @@ button.primary:hover {
416
  display: flex !important;
417
  align-items: center !important;
418
  justify-content: center !important;
419
- background: #f5f5f7 !important;
420
- border-radius: 12px !important;
421
  }
422
 
423
  .output-section > div > div {
@@ -427,13 +429,18 @@ button.primary:hover {
427
  display: flex !important;
428
  align-items: center !important;
429
  justify-content: center !important;
430
- background: #f5f5f7 !important;
431
  }
432
 
433
  .output-section * {
434
  max-width: 100% !important;
435
  }
436
 
 
 
 
 
 
 
437
  /* Dark Mode - title */
438
  .dark .main-title,
439
  .input-section .main-title {
@@ -591,15 +598,16 @@ with gr.Blocks() as demo:
591
  # Header
592
  gr.HTML("""
593
  <div class="header-container">
594
- <h1 class="main-title">FLUX.2 [dev]</h1>
595
  </div>
596
  """)
597
 
598
  # Prompt Textbox
599
  prompt = gr.Textbox(
600
  placeholder="Describe the image you want to create...",
601
- lines=15,
602
- max_lines=20,
 
603
  max_length=2000,
604
  label="Prompt",
605
  show_label=True,
 
373
  background: #0077ed !important;
374
  }
375
 
376
+ /* Output Section - White background like Z-Image */
377
+ div.output-section {
378
+ background: #ffffff !important;
379
  border-radius: 18px !important;
380
  padding: 32px !important;
381
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
382
  overflow: hidden !important;
383
  display: flex !important;
384
  align-items: center !important;
385
  justify-content: center !important;
386
  min-height: 80vh !important;
387
  max-height: 90vh !important;
 
388
  will-change: auto !important;
389
  position: relative !important;
390
+ flex-grow: 1 !important;
391
+ flex-shrink: 0 !important;
392
+ flex-basis: auto !important;
393
  }
394
 
395
  .output-section * {
 
406
  height: auto !important;
407
  object-fit: contain !important;
408
  transform: none !important;
409
+ transition: none !important;
410
+ animation: none !important;
411
  backface-visibility: hidden !important;
412
  -webkit-backface-visibility: hidden !important;
413
  }
 
420
  display: flex !important;
421
  align-items: center !important;
422
  justify-content: center !important;
 
 
423
  }
424
 
425
  .output-section > div > div {
 
429
  display: flex !important;
430
  align-items: center !important;
431
  justify-content: center !important;
 
432
  }
433
 
434
  .output-section * {
435
  max-width: 100% !important;
436
  }
437
 
438
+ /* Dark mode for output section */
439
+ .dark .output-section {
440
+ background: #1d1d1f !important;
441
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4) !important;
442
+ }
443
+
444
  /* Dark Mode - title */
445
  .dark .main-title,
446
  .input-section .main-title {
 
598
  # Header
599
  gr.HTML("""
600
  <div class="header-container">
601
+ <h1 class="main-title">FLUX.2-Image</h1>
602
  </div>
603
  """)
604
 
605
  # Prompt Textbox
606
  prompt = gr.Textbox(
607
  placeholder="Describe the image you want to create...",
608
+ value="create a highly detailed isometric 3d rendering of the Empire State Building in an architectural visualization style. extremely wide shot, very zoomed out, miniature scale model look. the building must be small enough to fit entirely within the frame with large margins on all sides. show complete building from street level to antenna tip. shown at a 45-degree angle from above, displaying three visible sides with intricate architectural details. use photorealistic textures for materials like stone, glass, metal, or brick. include the base/ground level with tiny people, cars, and landscaping for scale. use a clean white or light grey background. render it in a professional architectural style with soft ambient shadows beneath the structure. every window, column, ornamental detail, and structural element should be clearly visible. style should resemble video game building assets or architectural presentation models — clean, detailed, slightly stylized, but realistic",
609
+ lines=20,
610
+ max_lines=25,
611
  max_length=2000,
612
  label="Prompt",
613
  show_label=True,