Qi Cai commited on
Commit
907b3c5
·
1 Parent(s): 38ae4b8
Files changed (1) hide show
  1. app.py +17 -101
app.py CHANGED
@@ -354,83 +354,6 @@ APPLE_CSS = """
354
  color: #1d1d1f !important;
355
  }
356
 
357
- /* Header — two-column: title left, intro + links right. Compact so the whole
358
- form + image fit on one screen without scrolling. */
359
- #app-header {
360
- display: flex;
361
- align-items: center;
362
- justify-content: space-between;
363
- gap: 40px;
364
- padding: 28px 8px 18px 8px;
365
- }
366
- .header-left { flex-shrink: 0; }
367
- .header-left h1 {
368
- font-size: 46px;
369
- font-weight: 700;
370
- letter-spacing: -0.025em;
371
- margin: 0;
372
- /* line-height needs headroom for descenders (g/p/y) — at 1.0 the gradient
373
- text mask clips them. 1.2 gives clean rendering without adding extra
374
- visual whitespace because the H1 has no following sibling. */
375
- line-height: 1.2;
376
- padding-bottom: 2px;
377
- /* Apple-Intelligence-style gradient: system blue → indigo → purple → pink.
378
- Background is animated very slowly for a subtle "alive" feel. */
379
- background: linear-gradient(
380
- 120deg,
381
- #0071e3 0%,
382
- #5e5ce6 35%,
383
- #af52de 70%,
384
- #ff375f 100%
385
- );
386
- background-size: 200% 200%;
387
- -webkit-background-clip: text;
388
- -webkit-text-fill-color: transparent;
389
- background-clip: text;
390
- animation: title-shimmer 12s ease-in-out infinite;
391
- }
392
- @keyframes title-shimmer {
393
- 0%, 100% { background-position: 0% 50%; }
394
- 50% { background-position: 100% 50%; }
395
- }
396
- .header-right {
397
- flex: 1;
398
- text-align: right;
399
- max-width: 640px;
400
- }
401
- .header-right .subtitle {
402
- color: #6e6e73;
403
- font-size: 15px;
404
- font-weight: 400;
405
- line-height: 1.5;
406
- margin: 0 0 10px 0;
407
- }
408
- .header-right .links {
409
- display: flex;
410
- justify-content: flex-end;
411
- gap: 22px;
412
- flex-wrap: wrap;
413
- font-size: 13px;
414
- }
415
- .header-right .links a {
416
- color: #0071e3;
417
- text-decoration: none;
418
- font-weight: 500;
419
- transition: opacity 0.15s ease;
420
- }
421
- .header-right .links a:hover { opacity: 0.7; }
422
-
423
- @media (max-width: 820px) {
424
- #app-header {
425
- flex-direction: column;
426
- align-items: flex-start;
427
- gap: 14px;
428
- padding: 24px 8px 14px 8px;
429
- }
430
- .header-right { text-align: left; max-width: none; }
431
- .header-right .links { justify-content: flex-start; }
432
- }
433
-
434
  /* Cards / panels */
435
  .panel-card {
436
  background: #ffffff !important;
@@ -608,17 +531,27 @@ textarea:focus, input:focus,
608
  color: #0071e3;
609
  text-decoration: none;
610
  font-weight: 500;
 
611
  }
612
  .tagline a:hover { opacity: 0.7; }
613
 
 
 
 
 
 
 
 
 
 
 
 
614
  /* Hide gradio's default footer for a cleaner look */
615
  footer { display: none !important; }
616
 
617
  /* Mobile */
618
  @media (max-width: 640px) {
619
- #app-header { padding: 32px 16px 16px 16px; }
620
- #app-header h1 { font-size: 32px; }
621
- #app-header p.subtitle { font-size: 15px; }
622
  }
623
  """
624
 
@@ -673,24 +606,6 @@ def create_ui():
673
  theme=APPLE_THEME,
674
  css=APPLE_CSS,
675
  ) as demo:
676
- gr.HTML(
677
- """
678
- <div id="app-header">
679
- <div class="header-left">
680
- <h1>HiDream-O1-Image</h1>
681
- </div>
682
- <div class="header-right">
683
- <p class="subtitle">A natively unified pixel-space image generative model.</p>
684
- <div class="links">
685
- <a href="https://huggingface.co/HiDream-ai/HiDream-O1-Image" target="_blank">HuggingFace</a>
686
- <a href="https://github.com/HiDream-ai/HiDream-O1-Image" target="_blank">GitHub</a>
687
- <a href="https://x.com/vivago_ai" target="_blank">Twitter</a>
688
- </div>
689
- </div>
690
- </div>
691
- """
692
- )
693
-
694
  with gr.Row(equal_height=False):
695
  with gr.Column(scale=1, elem_classes=["panel-card"]):
696
  prompt = gr.Textbox(
@@ -852,9 +767,10 @@ def create_ui():
852
 
853
  gr.HTML(
854
  """
855
- <div class="tagline">
856
- For more features and the full experience, visit
857
- <a href="https://vivago.ai/" target="_blank">vivago.ai</a>.
 
858
  </div>
859
  """
860
  )
 
354
  color: #1d1d1f !important;
355
  }
356
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
357
  /* Cards / panels */
358
  .panel-card {
359
  background: #ffffff !important;
 
531
  color: #0071e3;
532
  text-decoration: none;
533
  font-weight: 500;
534
+ transition: opacity 0.15s ease;
535
  }
536
  .tagline a:hover { opacity: 0.7; }
537
 
538
+ /* Footer links row (HuggingFace / GitHub / Twitter) */
539
+ .footer-links {
540
+ display: flex;
541
+ justify-content: center;
542
+ align-items: center;
543
+ gap: 26px;
544
+ flex-wrap: wrap;
545
+ font-size: 13px;
546
+ margin: 24px 0 18px 0;
547
+ }
548
+
549
  /* Hide gradio's default footer for a cleaner look */
550
  footer { display: none !important; }
551
 
552
  /* Mobile */
553
  @media (max-width: 640px) {
554
+ .footer-links { gap: 18px; font-size: 12px; }
 
 
555
  }
556
  """
557
 
 
606
  theme=APPLE_THEME,
607
  css=APPLE_CSS,
608
  ) as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
609
  with gr.Row(equal_height=False):
610
  with gr.Column(scale=1, elem_classes=["panel-card"]):
611
  prompt = gr.Textbox(
 
767
 
768
  gr.HTML(
769
  """
770
+ <div class="tagline footer-links">
771
+ <a href="https://huggingface.co/HiDream-ai/HiDream-O1-Image" target="_blank">HuggingFace</a>
772
+ <a href="https://github.com/HiDream-ai/HiDream-O1-Image" target="_blank">GitHub</a>
773
+ <a href="https://x.com/vivago_ai" target="_blank">Twitter</a>
774
  </div>
775
  """
776
  )