Download tools/deploy_space_linux.sh from CVNSS/dich: direct link, hf CLI and curl.
- Browser
- Download file 533 Bytes
-
https://huggingface.co/spaces/CVNSS/dich/resolve/main/tools/deploy_space_linux.sh
- Command line
-
hf download hf://spaces/CVNSS/dich/tools/deploy_space_linux.sh
-
curl -L -o deploy_space_linux.sh https://huggingface.co/spaces/CVNSS/dich/resolve/main/tools/deploy_space_linux.sh
533 Bytes
| set -euo pipefail | |
| HF_USER="${1:-}" | |
| SPACE="${2:-}" | |
| if [[ -z "$HF_USER" || -z "$SPACE" ]]; then | |
| echo "Usage: tools/deploy_space_linux.sh HF_USERNAME SPACE_NAME" | |
| exit 1 | |
| fi | |
| huggingface-cli whoami >/dev/null 2>&1 || huggingface-cli login | |
| rm -rf "$SPACE" | |
| git clone "https://huggingface.co/spaces/$HF_USER/$SPACE" "$SPACE" | |
| rsync -av --exclude='.git' --exclude="$SPACE" --exclude='hf_bila_translator_space.zip' ./ "$SPACE/" | |
| cd "$SPACE" | |
| git add . | |
| git commit -m "Deploy Bila Translator Realtime Space" || true | |
| git push | |