#!/usr/bin/env python3 """Report the download sizes of the SUM Parts archives on Hugging Face.""" from huggingface_hub import HfApi REPO = "gwxgrxhyz/SUM-Parts" api = HfApi() info = api.repo_info(REPO, repo_type="dataset", files_metadata=True) rows = [] for s in info.siblings: size = s.size or (s.lfs.size if getattr(s, "lfs", None) else None) if size and size > 1_000_000: rows.append((s.rfilename, size)) rows.sort(key=lambda r: -r[1]) total = 0 for name, size in rows: print(f"{size / 1e9:>8.2f} GB {name}") total += size print(f"{'-' * 30}") print(f"{total / 1e9:>8.2f} GB total (files > 1 MB)")