File size: 533 Bytes
3f47554
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash
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