Spaces:
Running on Zero
Running on Zero
Condensate Titration: let the generated-images gallery scroll
Browse files
app.py
CHANGED
|
@@ -212,7 +212,7 @@ def build_condensate_titration_section():
|
|
| 212 |
curve_plot = gr.Plot(label="Condensate titration curve")
|
| 213 |
sample_plot = gr.Gallery(
|
| 214 |
label="Generated images (protein channel), captioned with the protein expression level (a.u.)",
|
| 215 |
-
columns=8, height=520, allow_preview=True, object_fit="contain",
|
| 216 |
)
|
| 217 |
|
| 218 |
with gr.Accordion("Per-image results", open=False):
|
|
@@ -359,6 +359,12 @@ def build_virtual_opencell_section():
|
|
| 359 |
show_progress="hidden", trigger_mode="always_last")
|
| 360 |
|
| 361 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 362 |
CITATION = """@article{zheng2026virtual,
|
| 363 |
title = {Virtual experiments bridge sequence and microscopy with generative models},
|
| 364 |
author = {Zheng, Dihan and Hong, Kibeom and Huang, Bo},
|
|
@@ -369,7 +375,7 @@ CITATION = """@article{zheng2026virtual,
|
|
| 369 |
}"""
|
| 370 |
|
| 371 |
|
| 372 |
-
with gr.Blocks(title="CELL-FM", theme=gr.themes.Soft(), css=
|
| 373 |
gr.Markdown(
|
| 374 |
"""
|
| 375 |
# CELL-FM
|
|
|
|
| 212 |
curve_plot = gr.Plot(label="Condensate titration curve")
|
| 213 |
sample_plot = gr.Gallery(
|
| 214 |
label="Generated images (protein channel), captioned with the protein expression level (a.u.)",
|
| 215 |
+
columns=8, height=520, allow_preview=True, object_fit="contain", elem_classes="cs-gallery",
|
| 216 |
)
|
| 217 |
|
| 218 |
with gr.Accordion("Per-image results", open=False):
|
|
|
|
| 359 |
show_progress="hidden", trigger_mode="always_last")
|
| 360 |
|
| 361 |
|
| 362 |
+
# Gradio's gallery block clips at its height; make the grid scroll inside it instead
|
| 363 |
+
CSS = viewer.CSS + """
|
| 364 |
+
.cs-gallery .gallery-container { height: 100%; }
|
| 365 |
+
.cs-gallery .grid-wrap { height: 100%; overflow-y: auto; }
|
| 366 |
+
"""
|
| 367 |
+
|
| 368 |
CITATION = """@article{zheng2026virtual,
|
| 369 |
title = {Virtual experiments bridge sequence and microscopy with generative models},
|
| 370 |
author = {Zheng, Dihan and Hong, Kibeom and Huang, Bo},
|
|
|
|
| 375 |
}"""
|
| 376 |
|
| 377 |
|
| 378 |
+
with gr.Blocks(title="CELL-FM", theme=gr.themes.Soft(), css=CSS, head=viewer.HEAD) as demo:
|
| 379 |
gr.Markdown(
|
| 380 |
"""
|
| 381 |
# CELL-FM
|