Download download_files.py from Rejekts/project: direct link, hf CLI and curl.
- Browser
- Download file 622 Bytes
-
https://huggingface.co/Rejekts/project/resolve/main/download_files.py
- Command line
-
hf download hf://Rejekts/project/download_files.py
-
curl -L -o download_files.py https://huggingface.co/Rejekts/project/resolve/main/download_files.py
622 Bytes
| import subprocess, os | |
| assets_folder = "./assets/" | |
| if not os.path.exists(assets_folder): | |
| os.makedirs(assets_folder) | |
| files = { | |
| "rmvpe/rmvpe.pt":"https://huggingface.co/Rejekts/project/resolve/main/rmvpe.pt", | |
| "hubert/hubert_base.pt":"https://huggingface.co/Rejekts/project/resolve/main/hubert_base.pt" | |
| } | |
| for file, link in files.items(): | |
| file_path = os.path.join(assets_folder, file) | |
| if not os.path.exists(file_path): | |
| try: | |
| subprocess.run(['wget', link, '-O', file_path], check=True) | |
| except subprocess.CalledProcessError as e: | |
| print(f"Error downloading {file}: {e}") | |