Spaces:
Sleeping
Sleeping
Update README with deployment instructions
Browse files- HF push workflow
- Git credentials setup
- Space settings reference
- Local dev instructions
- File structure overview
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
README.md
CHANGED
|
@@ -1,43 +1,84 @@
|
|
| 1 |
---
|
| 2 |
title: CRISPR Array Detection
|
| 3 |
emoji: 🧬
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
license: mit
|
| 9 |
---
|
| 10 |
|
| 11 |
-
#
|
| 12 |
|
| 13 |
-
|
| 14 |
|
| 15 |
## Model
|
| 16 |
|
| 17 |
-
|
| 18 |
-
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
| 21 |
|
| 22 |
-
##
|
| 23 |
|
| 24 |
-
|
| 25 |
-
- **Detect**: Automatically find CRISPR array regions above a threshold
|
| 26 |
-
- **Embeddings**: Extract hidden state vectors for visualization
|
| 27 |
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
-
|
| 31 |
-
2. Click "Predict" to get per-position scores
|
| 32 |
-
3. Or use "Detect Regions" for automated CRISPR calling
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
## Acknowledgements
|
| 39 |
|
| 40 |
-
- Ziyu Mu
|
| 41 |
-
- DFG SPP 2141 (
|
| 42 |
- BMBF GenomeNet
|
| 43 |
-
- Helmholtz Centre for Infection Research
|
|
|
|
| 1 |
---
|
| 2 |
title: CRISPR Array Detection
|
| 3 |
emoji: 🧬
|
| 4 |
+
colorFrom: gray
|
| 5 |
+
colorTo: gray
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
license: mit
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# crispr-detect
|
| 12 |
|
| 13 |
+
BERT-based CRISPR array detection in prokaryotic genomes.
|
| 14 |
|
| 15 |
## Model
|
| 16 |
|
| 17 |
+
| | |
|
| 18 |
+
|---|---|
|
| 19 |
+
| architecture | BERT, 24 layers, 768 hidden, 430M params |
|
| 20 |
+
| input | DNA sequence (min 1000 bp) |
|
| 21 |
+
| output | per-position probability (0-1) |
|
| 22 |
|
| 23 |
+
## Deployment
|
| 24 |
|
| 25 |
+
### Push changes
|
|
|
|
|
|
|
| 26 |
|
| 27 |
+
```bash
|
| 28 |
+
cd /vol/hpcprojects/pmuench/crispr_tool/crispr-hf-space
|
| 29 |
+
git add -A
|
| 30 |
+
git commit -m "description"
|
| 31 |
+
git push
|
| 32 |
+
```
|
| 33 |
|
| 34 |
+
### Git credentials (first time)
|
|
|
|
|
|
|
| 35 |
|
| 36 |
+
```bash
|
| 37 |
+
git config --global credential.helper store
|
| 38 |
+
huggingface-cli login
|
| 39 |
+
# paste token from https://huggingface.co/settings/tokens
|
| 40 |
+
```
|
| 41 |
|
| 42 |
+
### Clone fresh
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
git clone https://huggingface.co/spaces/genomenet/crispr-array-detection
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
### Space settings (HuggingFace web UI)
|
| 49 |
+
|
| 50 |
+
- SDK: Docker
|
| 51 |
+
- Hardware: T4 GPU
|
| 52 |
+
- Visibility: Public
|
| 53 |
+
|
| 54 |
+
### Model weights
|
| 55 |
+
|
| 56 |
+
Hosted at: https://huggingface.co/pmuench3/crispr-bert-model
|
| 57 |
+
|
| 58 |
+
Downloaded automatically via `huggingface_hub` at startup.
|
| 59 |
+
|
| 60 |
+
## Local dev
|
| 61 |
+
|
| 62 |
+
```bash
|
| 63 |
+
pip install -r requirements.txt
|
| 64 |
+
python app.py
|
| 65 |
+
# http://localhost:7860
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
## Files
|
| 69 |
+
|
| 70 |
+
```
|
| 71 |
+
├── app.py # gradio app
|
| 72 |
+
├── inference/
|
| 73 |
+
│ ├── model_loader.py # model download
|
| 74 |
+
│ ├── tokenizer.py # sequence validation
|
| 75 |
+
│ └── inference.py # prediction
|
| 76 |
+
├── Dockerfile
|
| 77 |
+
└── requirements.txt
|
| 78 |
+
```
|
| 79 |
|
| 80 |
## Acknowledgements
|
| 81 |
|
| 82 |
+
- Ziyu Mu (HZI BIFO)
|
| 83 |
+
- DFG SPP 2141 (MC 172)
|
| 84 |
- BMBF GenomeNet
|
|
|