Spaces:
Paused
Paused
File size: 648 Bytes
d5c5d99 dd44013 d5c5d99 dd44013 d5c5d99 dd44013 d5c5d99 dd44013 d5c5d99 dd44013 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #!/usr/bin/env python3
"""Download model weights from HuggingFace model repository."""
import os
from pathlib import Path
# Always download weights from model repository
repo = os.environ.get('FOUNDATIONPOSE_MODEL_REPO', 'gpue/foundationpose-weights')
token = os.environ.get('HF_TOKEN')
print(f'Downloading weights from {repo}...')
try:
from huggingface_hub import snapshot_download
snapshot_download(
repo_id=repo,
local_dir='weights',
token=token,
repo_type='model'
)
print('✓ Weights downloaded successfully')
except Exception as e:
print(f'✗ Weight download failed: {e}')
raise
|