Anabelle Handdoek
fix(space): move flash-attn install to postBuild; remove from requirements; improve HF messaging
4d5ade5 Download postBuild from heyanabelle/Florence-2-Image-Caption: direct link, hf CLI and curl.
- Browser
- Download file 356 Bytes
-
https://huggingface.co/spaces/heyanabelle/Florence-2-Image-Caption/resolve/main/postBuild
- Command line
-
hf download hf://spaces/heyanabelle/Florence-2-Image-Caption/postBuild
-
curl -L -o postBuild https://huggingface.co/spaces/heyanabelle/Florence-2-Image-Caption/resolve/main/postBuild
356 Bytes
| set -euxo pipefail | |
| # Install flash-attn only if CUDA is present (GPU Space) | |
| if python - <<'PY' | |
| import torch, sys | |
| print('cuda', torch.cuda.is_available()) | |
| PY | |
| then | |
| pip install --no-cache-dir flash-attn --no-build-isolation || echo "flash-attn install failed; continuing" | |
| else | |
| echo "No CUDA available; skipping flash-attn install" | |
| fi | |