"""Upload preprocessed .pt cache to Hugging Face. 6,050 files × ~4 MB = ~24 GB. Uploads in batches of 60 files (~240 MB/batch). Resumable: HF Hub skips files already uploaded (content-addressed). """ from __future__ import annotations import time from pathlib import Path from huggingface_hub import HfApi, CommitOperationAdd TOKEN = "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" REPO_ID = "bilalahmad176176/BrainAge-Golden-Preprocessed" CACHE_DIR = Path("/home/MRI-DataSet/_train/cache") BATCH_SIZE = 60 def upload_readme(api: HfApi): readme = """--- license: cc-by-nc-4.0 task_categories: - other language: - en pretty_name: BrainAge Golden Preprocessed Cache size_categories: - 1K