makiling commited on
Commit
5c99013
·
verified ·
1 Parent(s): 058c999

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +49 -12
README.md CHANGED
@@ -1,12 +1,49 @@
1
- ---
2
- title: Polyreactivity Benchmark
3
- emoji: 📚
4
- colorFrom: green
5
- colorTo: green
6
- sdk: gradio
7
- sdk_version: 5.47.0
8
- app_file: app.py
9
- pinned: false
10
- ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Polyreactivity Space
2
+
3
+ Interactive Gradio interface for scoring antibody sequences with the trained
4
+ polyreactivity model.
5
+
6
+ ## Usage
7
+
8
+ 1. Train a model (see project README) and ensure the resulting artifact is
9
+ accessible at `artifacts/model.joblib`, or upload the file through the UI.
10
+ 2. Launch locally:
11
+ ```bash
12
+ python space/app.py
13
+ ```
14
+ 3. Provide a heavy-chain sequence (optional light chain) and click **Predict**,
15
+ or upload a CSV with columns `id, heavy_seq[, light_seq]` for batch scoring.
16
+
17
+ ### Benchmark mode
18
+
19
+ - Include a binary `label` column to obtain accuracy, F1, ROC-AUC, PR-AUC, and
20
+ Brier score against your ground truth.
21
+ - Include a `reactivity_count` column to compute Spearman correlation between
22
+ predicted probabilities and graded ELISA flag counts.
23
+ - The app writes merged inputs + predictions to `polyreact_predictions.csv`
24
+ for downstream analysis.
25
+
26
+ ### Environment Variables
27
+
28
+ - `POLYREACT_MODEL_PATH` — default path to the trained model artifact.
29
+ - `POLYREACT_CONFIG_PATH` — default YAML configuration for inference overrides.
30
+
31
+ Both variables are optional; when unset, the app looks for
32
+ `artifacts/model.joblib` and `configs/default.yaml` relative to the project root.
33
+
34
+ ## Deploying to Hugging Face Spaces
35
+
36
+ Automate deployment with the helper script once you have set
37
+ `HF_TOKEN` (or another environment variable of your choice) with a
38
+ Hugging Face write token:
39
+
40
+ ```bash
41
+ export HF_TOKEN=hf_your_write_token
42
+ python space/deploy.py --space-id your-username/polyreactivity-space
43
+ ```
44
+
45
+ Add `--private` if you prefer a private Space or use `--token-env` when the
46
+ token lives under a different variable name. The script uploads the package,
47
+ configuration, and Space assets — including the default
48
+ `artifacts/model.joblib` — so the interface is ready immediately after the
49
+ build completes.