File size: 1,054 Bytes
249f9dc |
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 28 29 30 31 |
from huggingface_hub import HfApi
def upload_huge_dataset(dataset_root, repo_id):
api = HfApi()
print(f"🚀 Starting Resilient Upload for {repo_id}...")
print("This will automatically split your 16k+ files into multiple commits.")
try:
api.upload_large_folder(
folder_path=dataset_root,
repo_id=repo_id,
repo_type="dataset",
# Optional: Ignore hidden files or cache
ignore_patterns=[".git", ".cache", "**/.ipynb_checkpoints"],
# num_workers=4 can speed it up, but be careful with bandwidth
num_workers=4
)
print("✅ Upload Complete! Check your repo.")
except Exception as e:
print(f"❌ Error: {e}")
print("💡 If it failed halfway, just run this script again. It will resume where it left off!")
# --- CONFIG ---
# Point this to your "atc_dataset" folder where 'train_audio', 'test_audio' are.
local_folder = "."
repo = "MrEzzat/atc-dataset"
upload_huge_dataset(local_folder, repo)
|