File size: 630 Bytes
eb75f9c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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.")