Spaces:
Running
Running
Fix Gradio 6.0: move css to launch(), remove scale from Markdown
Browse files
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"
|
| 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 |
-
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
| 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&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)
|