Spaces:
Runtime error
Runtime error
Download scripts/copy_models.py from dashVector/dashVectorSpace: direct link, hf CLI and curl.
- Browser
- Download file 490 Bytes
-
https://huggingface.co/spaces/dashVector/dashVectorSpace/resolve/main/scripts/copy_models.py
- Command line
-
hf download hf://spaces/dashVector/dashVectorSpace/scripts/copy_models.py
-
curl -L -o copy_models.py https://huggingface.co/spaces/dashVector/dashVectorSpace/resolve/main/scripts/copy_models.py
490 Bytes
| import os | |
| import shutil | |
| import glob | |
| def copy_models(): | |
| src_dir = "models" | |
| dest_dir = "hf_deploy/models" | |
| os.makedirs(dest_dir, exist_ok=True) | |
| # Copy Routers (.pkl) | |
| patterns = ["router_*.pkl", "shard_sizes_*.json"] | |
| for pattern in patterns: | |
| files = glob.glob(os.path.join(src_dir, pattern)) | |
| for f in files: | |
| shutil.copy(f, dest_dir) | |
| print(f"Copied {f} to {dest_dir}") | |
| if __name__ == "__main__": | |
| copy_models() | |