#!/usr/bin/env bash # Run from inside this directory on YOUR LOCAL MACHINE after rsync'ing # this folder down from LLNL. # # Pre-reqs: # pip install -U "huggingface_hub[cli]" # hf auth login # paste a write token # # Uploads the 260 MB targets-only author_bank to the existing repo, # overwriting the previous 870 MB version. set -euo pipefail cd "$(dirname "$0")" REPO=rrivera1849/style-aware-paraphraser-author-bank-reddit # Delete the old (larger) file first so HF doesn't keep both revisions # clogging LFS storage. `--delete '*.jsonl'` deletes matching paths in the # repo before uploading. hf upload "$REPO" . . --repo-type=dataset --delete '*.jsonl' echo echo "Done. Verify:" echo " python -c \"from datasets import load_dataset; ds = load_dataset('$REPO', split='train', streaming=True); r = next(iter(ds)); print(list(r), len(r['reference_text']))\""