Spaces:
Running on Zero
Running on Zero
Commit 路
c5021ff
1
Parent(s): e413269
Align Results tables and fix overlapping table headers
Browse filesLay out the Results page as two rows (charts, then tables) so the
architecture audit and pathway attention tables start at the same
height. Give pinned table headers an opaque background so scrolled rows
no longer show through them.
- app.py +15 -10
- biolmnet/ui/styles.py +3 -1
app.py
CHANGED
|
@@ -1378,16 +1378,21 @@ with gr.Blocks(title="BioLM-NET Workbench", fill_width=True) as demo:
|
|
| 1378 |
results_empty_note = gr.HTML(ui.empty_note_html("Build the biological architecture, train a model, or run prediction to populate this page."))
|
| 1379 |
with gr.Row(elem_classes=["results-stat-row"], visible=False) as results_stats_row:
|
| 1380 |
results_stats = gr.HTML("")
|
| 1381 |
-
|
| 1382 |
-
|
| 1383 |
-
|
| 1384 |
-
|
| 1385 |
-
|
| 1386 |
-
|
| 1387 |
-
|
| 1388 |
-
|
| 1389 |
-
|
| 1390 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1391 |
with gr.Column(visible=False) as results_tables_bottom:
|
| 1392 |
gr.HTML('<div class="mono sect sect-spaced">Validation predictions</div>')
|
| 1393 |
results_validation_table = gr.Dataframe(max_height=TABLE_MAX_HEIGHT, interactive=False, wrap=False, value=pd.DataFrame(), headers=[""], column_count=(1, "dynamic"))
|
|
|
|
| 1378 |
results_empty_note = gr.HTML(ui.empty_note_html("Build the biological architecture, train a model, or run prediction to populate this page."))
|
| 1379 |
with gr.Row(elem_classes=["results-stat-row"], visible=False) as results_stats_row:
|
| 1380 |
results_stats = gr.HTML("")
|
| 1381 |
+
# Two rows so the side-by-side panels in each row start at the same height.
|
| 1382 |
+
with gr.Column(visible=False) as results_content:
|
| 1383 |
+
with gr.Row(elem_classes=["results-grid"], equal_height=False):
|
| 1384 |
+
with gr.Column(scale=6, min_width=0):
|
| 1385 |
+
gr.HTML('<div class="mono sect">Training history</div>')
|
| 1386 |
+
results_loss_plot = gr.Plot(show_label=False)
|
| 1387 |
+
with gr.Column(scale=6, min_width=0):
|
| 1388 |
+
results_confusion = gr.HTML("")
|
| 1389 |
+
with gr.Row(elem_classes=["results-grid"], equal_height=False):
|
| 1390 |
+
with gr.Column(scale=6, min_width=0):
|
| 1391 |
+
gr.HTML('<div class="mono sect">Sparse architecture audit</div>')
|
| 1392 |
+
results_architecture_table = gr.Dataframe(max_height=TABLE_MAX_HEIGHT, interactive=False, wrap=False, value=pd.DataFrame(), headers=[""], column_count=(1, "dynamic"))
|
| 1393 |
+
with gr.Column(scale=6, min_width=0):
|
| 1394 |
+
gr.HTML('<div class="mono sect">Pathway attention 路 top retained</div>')
|
| 1395 |
+
results_pathway_table = gr.Dataframe(max_height=TABLE_MAX_HEIGHT, interactive=False, wrap=False, value=pd.DataFrame(), headers=[""], column_count=(1, "dynamic"))
|
| 1396 |
with gr.Column(visible=False) as results_tables_bottom:
|
| 1397 |
gr.HTML('<div class="mono sect sect-spaced">Validation predictions</div>')
|
| 1398 |
results_validation_table = gr.Dataframe(max_height=TABLE_MAX_HEIGHT, interactive=False, wrap=False, value=pd.DataFrame(), headers=[""], column_count=(1, "dynamic"))
|
biolmnet/ui/styles.py
CHANGED
|
@@ -621,7 +621,9 @@ body, .gradio-container {
|
|
| 621 |
.gradio-container table { color: var(--color-text) !important; font-size: 12.5px !important; }
|
| 622 |
.gradio-container thead th {
|
| 623 |
font: 500 10px/1 var(--font-mono) !important; letter-spacing: .1em; text-transform: uppercase;
|
| 624 |
-
color: var(--color-muted-2) !important;
|
|
|
|
|
|
|
| 625 |
border-bottom: 1px solid var(--color-divider) !important;
|
| 626 |
}
|
| 627 |
.gradio-container tbody td { border-bottom: 1px solid var(--color-row-rule) !important; }
|
|
|
|
| 621 |
.gradio-container table { color: var(--color-text) !important; font-size: 12.5px !important; }
|
| 622 |
.gradio-container thead th {
|
| 623 |
font: 500 10px/1 var(--font-mono) !important; letter-spacing: .1em; text-transform: uppercase;
|
| 624 |
+
color: var(--color-muted-2) !important;
|
| 625 |
+
/* opaque so rows scrolling under the pinned header stay hidden */
|
| 626 |
+
background: var(--color-bg) !important;
|
| 627 |
border-bottom: 1px solid var(--color-divider) !important;
|
| 628 |
}
|
| 629 |
.gradio-container tbody td { border-bottom: 1px solid var(--color-row-rule) !important; }
|