| from huggingface_hub import HfApi | |
| api = HfApi() | |
| # Configuration | |
| REPO_ID = "XSpaceCoderX/ACE-Trajectories_noTosses" | |
| LOCAL_FOLDER = "/data/goeppeal/data_tennis/tracknet/tracknet_03-18/trajectories_noTosses" | |
| print(f"Starting resilient upload for: {REPO_ID}") | |
| # upload_large_folder is optimized for folders with many files | |
| # It automatically handles multi-threading and resumes after interruptions | |
| api.upload_large_folder( | |
| repo_id=REPO_ID, | |
| repo_type="dataset", | |
| folder_path=LOCAL_FOLDER, | |
| # Optional: you can specify the number of workers if the server is powerful | |
| # num_workers=8 | |
| ) | |
| print("Upload successful.") |