File size: 560 Bytes
8bc7d2f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
# Deploy current working directory to Hugging Face Spaces
set -euo pipefail

REPO_ID="Feng-X/ring-sizer"
IGNORE='[".venv/*", ".git/*", "__pycache__/*", "*.pyc", "output/*", "web_demo/uploads/*", "web_demo/results/*", "doc/*", ".claude/*", "input/*"]'

cd "$(dirname "$0")/.."

source .venv/bin/activate

python -c "
from huggingface_hub import HfApi
HfApi().upload_folder(
    folder_path='.',
    repo_id='${REPO_ID}',
    repo_type='space',
    ignore_patterns=${IGNORE},
)
print('Deployed to https://huggingface.co/spaces/${REPO_ID}')
"