murphylmf commited on
Commit
bf74e21
Β·
1 Parent(s): 5196dda
Files changed (1) hide show
  1. app.py +8 -25
app.py CHANGED
@@ -473,28 +473,11 @@ js_scrub = """(val) => {
473
  return val;
474
  }"""
475
 
476
- # Updated CSS with stricter selectors to force text colors in alert boxes
477
  custom_css = """
478
  footer {visibility: hidden}
479
  h1.header-title { text-align: center; font-family: 'Segoe UI', sans-serif; font-weight: 700; color: var(--body-text-color); margin-bottom: 2rem; }
480
- .alert-box { padding: 1rem; border-radius: 0.5rem; margin-bottom: 1rem; font-size: 0.9rem; line-height: 1.5; }
481
-
482
- /* Fix for Dark Mode:
483
- Use !important and target children (*, strong, div) to override Gradio's global dark theme text colors.
484
- This ensures text remains dark even if the user is in Dark Mode, because these boxes have fixed light backgrounds.
485
- */
486
-
487
- /* Blue Info Box */
488
- .info-box { background-color: #eff6ff; border-left: 4px solid #3b82f6; }
489
- .info-box, .info-box * { color: #1e40af !important; }
490
 
491
- /* Yellow Warning Box */
492
- .warning-box { background-color: #fefce8; border-left: 4px solid #eab308; }
493
- .warning-box, .warning-box * { color: #854d0e !important; }
494
-
495
- /* Green Tip Box */
496
- .tip-box { background-color: #f0fdf4; border-left: 4px solid #22c55e; }
497
- .tip-box, .tip-box * { color: #15803d !important; }
498
 
499
  .viewer-container { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color-primary); background: var(--background-fill-secondary); }
500
  #run-btn { background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); border: none; color: white; font-weight: bold; transition: all 0.2s; }
@@ -520,9 +503,9 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="indigo", radius_size="md"), css
520
  end_time = gr.Slider(minimum=0, maximum=10, value=3, step=0.01, label="End Time (s)")
521
 
522
  gr.HTML("""
523
- <div class="alert-box tip-box">
524
- <strong>πŸ’‘ Use Tips:</strong>
525
- <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; font-size: 0.85em; line-height: 1.4;">
526
  <div>1. Contain only a <strong>single person</strong>.</div>
527
  <div>2. <strong>No occlusion</strong> (self-occlusion is fine).</div>
528
  <div>3. Keep the <strong>full body</strong> mostly visible.</div>
@@ -553,12 +536,12 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="indigo", radius_size="md"), css
553
  )
554
 
555
  gr.HTML("""
556
- <div class="alert-box warning-box">
557
- <strong>⚑ Performance Note:</strong><br>
558
  Inference (feed-forward) is very fast, but generating visualization assets (meshing & rendering) takes up most of the processing time.
559
  </div>
560
- <div class="alert-box info-box">
561
- <strong>πŸ‘οΈ Visual Quality:</strong><br>
562
  The displayed results are downsampled for better web rendering performance.
563
  </div>
564
  """)
 
473
  return val;
474
  }"""
475
 
 
476
  custom_css = """
477
  footer {visibility: hidden}
478
  h1.header-title { text-align: center; font-family: 'Segoe UI', sans-serif; font-weight: 700; color: var(--body-text-color); margin-bottom: 2rem; }
 
 
 
 
 
 
 
 
 
 
479
 
480
+ .alert-box { padding: 1rem; border-radius: 0.5rem; margin-bottom: 1rem; font-size: 0.9rem; line-height: 1.5; }
 
 
 
 
 
 
481
 
482
  .viewer-container { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color-primary); background: var(--background-fill-secondary); }
483
  #run-btn { background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); border: none; color: white; font-weight: bold; transition: all 0.2s; }
 
503
  end_time = gr.Slider(minimum=0, maximum=10, value=3, step=0.01, label="End Time (s)")
504
 
505
  gr.HTML("""
506
+ <div class="alert-box" style="background-color: #f0fdf4; border-left: 4px solid #22c55e; color: #15803d;">
507
+ <strong style="color: #15803d;">πŸ’‘ Use Tips:</strong>
508
+ <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; font-size: 0.85em; line-height: 1.4; color: #15803d;">
509
  <div>1. Contain only a <strong>single person</strong>.</div>
510
  <div>2. <strong>No occlusion</strong> (self-occlusion is fine).</div>
511
  <div>3. Keep the <strong>full body</strong> mostly visible.</div>
 
536
  )
537
 
538
  gr.HTML("""
539
+ <div class="alert-box" style="background-color: #fefce8; border-left: 4px solid #eab308; color: #854d0e;">
540
+ <strong style="color: #854d0e;">⚑ Performance Note:</strong><br>
541
  Inference (feed-forward) is very fast, but generating visualization assets (meshing & rendering) takes up most of the processing time.
542
  </div>
543
+ <div class="alert-box" style="background-color: #eff6ff; border-left: 4px solid #3b82f6; color: #1e40af;">
544
+ <strong style="color: #1e40af;">πŸ‘οΈ Visual Quality:</strong><br>
545
  The displayed results are downsampled for better web rendering performance.
546
  </div>
547
  """)