faceless-void commited on
Commit
2cf02f9
Β·
verified Β·
1 Parent(s): 9e7b0a0

Fix Gradio 6.0: move css to launch(), remove scale from Markdown

Browse files
Files changed (1) hide show
  1. app.py +8 -10
app.py CHANGED
@@ -361,7 +361,7 @@ if gallery_data:
361
  gallery_name_map[label] = key
362
  gallery_display_names.append(label)
363
 
364
- with gr.Blocks(title="UNIStainNet β€” Virtual IHC Staining", css=CUSTOM_CSS) as demo:
365
 
366
  # ── Header ──────────────────────────────────────────────────────
367
  gr.HTML("""
@@ -394,14 +394,12 @@ with gr.Blocks(title="UNIStainNet β€” Virtual IHC Staining", css=CUSTOM_CSS) as
394
  Each example shows the H&E input, ground truth IHC, and all 4 generated stains from our unified model.
395
  </div>
396
  """)
397
- with gr.Row():
398
- gallery_dropdown = gr.Dropdown(
399
- choices=gallery_display_names,
400
- value=gallery_display_names[0] if gallery_display_names else None,
401
- label="Select Example",
402
- scale=3,
403
- )
404
- gallery_info_box = gr.Markdown(value="", scale=2)
405
 
406
  gr.HTML('<p class="section-heading">Input & Ground Truth</p>')
407
  with gr.Row():
@@ -574,4 +572,4 @@ with gr.Blocks(title="UNIStainNet β€” Virtual IHC Staining", css=CUSTOM_CSS) as
574
  """)
575
 
576
  if __name__ == "__main__":
577
- demo.launch(theme=gr.themes.Soft())
 
361
  gallery_name_map[label] = key
362
  gallery_display_names.append(label)
363
 
364
+ with gr.Blocks(title="UNIStainNet β€” Virtual IHC Staining") as demo:
365
 
366
  # ── Header ──────────────────────────────────────────────────────
367
  gr.HTML("""
 
394
  Each example shows the H&amp;E input, ground truth IHC, and all 4 generated stains from our unified model.
395
  </div>
396
  """)
397
+ gallery_dropdown = gr.Dropdown(
398
+ choices=gallery_display_names,
399
+ value=gallery_display_names[0] if gallery_display_names else None,
400
+ label="Select Example",
401
+ )
402
+ gallery_info_box = gr.Markdown(value="")
 
 
403
 
404
  gr.HTML('<p class="section-heading">Input & Ground Truth</p>')
405
  with gr.Row():
 
572
  """)
573
 
574
  if __name__ == "__main__":
575
+ demo.launch(theme=gr.themes.Soft(), css=CUSTOM_CSS)