Spaces:
Sleeping
Sleeping
changed CV to cross validation and increased font size in first page
Browse files
streamlit_hf/home.py
CHANGED
|
@@ -91,7 +91,7 @@ html, body {{
|
|
| 91 |
margin: 0;
|
| 92 |
padding: 0;
|
| 93 |
background: transparent;
|
| 94 |
-
overflow:
|
| 95 |
box-sizing: border-box;
|
| 96 |
}}
|
| 97 |
.ff-experiment-svg-wrap {{ width: {width_px}px; max-width: 100%; overflow: visible; }}
|
|
@@ -399,11 +399,11 @@ st.markdown(
|
|
| 399 |
)
|
| 400 |
|
| 401 |
with st.container(border=True):
|
| 402 |
-
#
|
| 403 |
try:
|
| 404 |
-
fig_col, text_col = st.columns([0.
|
| 405 |
except TypeError:
|
| 406 |
-
fig_col, text_col = st.columns([0.
|
| 407 |
with fig_col:
|
| 408 |
if _EXPERIMENT_SVG.is_file():
|
| 409 |
_render_experiment_schematic(_EXPERIMENT_FIGURE_WIDTH_PX)
|
|
|
|
| 91 |
margin: 0;
|
| 92 |
padding: 0;
|
| 93 |
background: transparent;
|
| 94 |
+
overflow: hidden;
|
| 95 |
box-sizing: border-box;
|
| 96 |
}}
|
| 97 |
.ff-experiment-svg-wrap {{ width: {width_px}px; max-width: 100%; overflow: visible; }}
|
|
|
|
| 399 |
)
|
| 400 |
|
| 401 |
with st.container(border=True):
|
| 402 |
+
# Slightly narrower text column; keep balanced spacing and centered vertical alignment.
|
| 403 |
try:
|
| 404 |
+
fig_col, text_col = st.columns([0.38, 0.62], gap="medium", vertical_alignment="center")
|
| 405 |
except TypeError:
|
| 406 |
+
fig_col, text_col = st.columns([0.38, 0.62], gap="medium")
|
| 407 |
with fig_col:
|
| 408 |
if _EXPERIMENT_SVG.is_file():
|
| 409 |
_render_experiment_schematic(_EXPERIMENT_FIGURE_WIDTH_PX)
|
streamlit_hf/lib/formatters.py
CHANGED
|
@@ -35,7 +35,7 @@ LATENT_TABLE_RENAME: dict[str, str] = {
|
|
| 35 |
"modality_label": "Available modalities",
|
| 36 |
"dataset_idx": "Dataset index",
|
| 37 |
"batch_no": "Batch",
|
| 38 |
-
"fold": "
|
| 39 |
"clone_id": "Clone ID",
|
| 40 |
"clone_size": "Clone size",
|
| 41 |
"cell_type": "Cell type",
|
|
|
|
| 35 |
"modality_label": "Available modalities",
|
| 36 |
"dataset_idx": "Dataset index",
|
| 37 |
"batch_no": "Batch",
|
| 38 |
+
"fold": "Cross Validation fold",
|
| 39 |
"clone_id": "Clone ID",
|
| 40 |
"clone_size": "Clone size",
|
| 41 |
"cell_type": "Cell type",
|
streamlit_hf/lib/plots.py
CHANGED
|
@@ -129,7 +129,7 @@ def latent_scatter(
|
|
| 129 |
"modality_label": "Available modalities",
|
| 130 |
"dataset_idx": "Dataset index",
|
| 131 |
"batch_no": "Batch",
|
| 132 |
-
"fold": "
|
| 133 |
}
|
| 134 |
labels_map = {c: _disp[c] for c in _disp if c in d.columns}
|
| 135 |
|
|
|
|
| 129 |
"modality_label": "Available modalities",
|
| 130 |
"dataset_idx": "Dataset index",
|
| 131 |
"batch_no": "Batch",
|
| 132 |
+
"fold": "Cross Validation fold",
|
| 133 |
}
|
| 134 |
labels_map = {c: _disp[c] for c in _disp if c in d.columns}
|
| 135 |
|
streamlit_hf/lib/ui.py
CHANGED
|
@@ -178,7 +178,7 @@ section[data-testid="stMain"] .ff-hero .ff-hero-text h1 {
|
|
| 178 |
}
|
| 179 |
.ff-hero-sub {
|
| 180 |
margin: 0;
|
| 181 |
-
max-width:
|
| 182 |
font-size: 0.98rem;
|
| 183 |
line-height: 1.55;
|
| 184 |
color: rgba(226, 232, 240, 0.95);
|
|
|
|
| 178 |
}
|
| 179 |
.ff-hero-sub {
|
| 180 |
margin: 0;
|
| 181 |
+
max-width: 100%;
|
| 182 |
font-size: 0.98rem;
|
| 183 |
line-height: 1.55;
|
| 184 |
color: rgba(226, 232, 240, 0.95);
|
streamlit_hf/pages/1_Single_Cell_Explorer.py
CHANGED
|
@@ -27,9 +27,9 @@ _UMAP_EXPLORER_SUBTITLE = "Hover points for details · drag on the plot to selec
|
|
| 27 |
_UMAP_EXPLORER_HELP = f"""
|
| 28 |
**What this is:** The same **2‑D UMAP** as on **Home**: validation **single cells** in **FateFormer**’s **latent space** (**context vector token representation**), summarised across **5-fold cross-validation** (**2,110** cells before filters). Here you **choose what to colour** and **filter** the cloud.
|
| 29 |
|
| 30 |
-
**How to read it:** Each point is one cell. **Colour** comes from **Colour by**: e.g. [**CellTag-Multi**]({_CELLTAG_MULTI_ARTICLE_URL}) **label**, **predicted fate**, **prediction correct / wrong**, **
|
| 31 |
|
| 32 |
-
**Using this page:** Use **Filters** to keep modality combinations, restrict **prediction outcome** (all / correct only / wrong only), choose **
|
| 33 |
"""
|
| 34 |
|
| 35 |
st.title("Single-Cell Explorer")
|
|
@@ -64,7 +64,7 @@ with left:
|
|
| 64 |
"label": "CellTag-Multi label",
|
| 65 |
"predicted_class": "Predicted fate",
|
| 66 |
"correct": "Prediction correct",
|
| 67 |
-
"fold": "
|
| 68 |
"batch_no": "Batch",
|
| 69 |
"pct": "Dominant fate %",
|
| 70 |
}[x],
|
|
@@ -87,7 +87,7 @@ with left:
|
|
| 87 |
)
|
| 88 |
folds = sorted(df["fold"].unique())
|
| 89 |
fold_pick = st.multiselect(
|
| 90 |
-
"
|
| 91 |
folds,
|
| 92 |
default=folds,
|
| 93 |
help="Validation cross-validation folds to include (each fold’s held-out cells).",
|
|
|
|
| 27 |
_UMAP_EXPLORER_HELP = f"""
|
| 28 |
**What this is:** The same **2‑D UMAP** as on **Home**: validation **single cells** in **FateFormer**’s **latent space** (**context vector token representation**), summarised across **5-fold cross-validation** (**2,110** cells before filters). Here you **choose what to colour** and **filter** the cloud.
|
| 29 |
|
| 30 |
+
**How to read it:** Each point is one cell. **Colour** comes from **Colour by**: e.g. [**CellTag-Multi**]({_CELLTAG_MULTI_ARTICLE_URL}) **label**, **predicted fate**, **prediction correct / wrong**, **Cross Validation fold**, **batch**, or **dominant fate %**. **Axes are unitless** (UMAP preserves *local* neighbourhoods only). **Hover** a point for per-cell fields.
|
| 31 |
|
| 32 |
+
**Using this page:** Use **Filters** to keep modality combinations, restrict **prediction outcome** (all / correct only / wrong only), choose **Cross Validation folds**, and set a **dominant fate %** range. In the plot **toolbar** (top right), pick **Box select** or **Lasso select**, then **drag** on the canvas; the app **reruns** and the **Selected points** table fills with those rows. To inspect **one** cell without a selection, scroll to **Inspect by dataset index**.
|
| 33 |
"""
|
| 34 |
|
| 35 |
st.title("Single-Cell Explorer")
|
|
|
|
| 64 |
"label": "CellTag-Multi label",
|
| 65 |
"predicted_class": "Predicted fate",
|
| 66 |
"correct": "Prediction correct",
|
| 67 |
+
"fold": "Cross Validation fold",
|
| 68 |
"batch_no": "Batch",
|
| 69 |
"pct": "Dominant fate %",
|
| 70 |
}[x],
|
|
|
|
| 87 |
)
|
| 88 |
folds = sorted(df["fold"].unique())
|
| 89 |
fold_pick = st.multiselect(
|
| 90 |
+
"Cross Validation folds",
|
| 91 |
folds,
|
| 92 |
default=folds,
|
| 93 |
help="Validation cross-validation folds to include (each fold’s held-out cells).",
|