File size: 1,697 Bytes
4d886f4
 
 
 
 
 
 
bb7cba9
4d886f4
0cb901e
4d886f4
 
 
 
 
 
 
998c09d
4d886f4
 
 
 
 
 
 
 
 
 
 
 
 
 
834ac08
4d886f4
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Hugging Face Space (Docker + Streamlit)

The **root `README.md`** starts with the YAML card Hugging Face reads for the Space (title, tags, colours, `sdk: docker`, `app_port: 7860`). Copy that block if you maintain a separate Space README.

```yaml
---
title: FateFormer Explorer
short_description: Multimodal fate from RNA, ATAC, and metabolic flux models.
emoji: 🧬
colorFrom: purple
colorTo: indigo
tags:
  - single-cell
  - multi-omics
  - genomics
  - atac-seq
  - rna-seq
  - fluxomic
  - metabolic-modeling
  - deep-learning
  - biology
license: mit
sdk: docker
app_port: 7860
---
```

`app_port` **7860** matches the root **`Dockerfile`** (`streamlit ... --server.port 7860`). Local runs use Streamlit’s default **8501** unless you pass `--server.port`.

## Before first deploy

1. Run locally: `python scripts/precompute_streamlit_cache.py` (requires GPU/CPU time for attention).
2. Commit **`streamlit_hf/cache/`** contents (`latent_umap.pkl`, `attention_summary.pkl`, `attention_feature_ranks.pkl`, `df_features.parquet`, and optionally `samples.parquet` if you use it elsewhere). **Hugging Face rejects raw Parquet in git:** `*.parquet` is tracked with **Git LFS** via root `.gitattributes` (same idea as `*.pkl`). If an old commit still has Parquet as a normal blob, run `git lfs migrate import --include="*.parquet" --everything` then force-push. These paths may be in `.gitignore`; use `git add -f streamlit_hf/cache/*` when you want them in the remote.
3. Keep **`ckp/`** model weights available only if you run precompute in CI; the slim Docker image does **not** include PyTorch and expects precomputed caches.

The repository **`Dockerfile`** at the root builds the Space.