#!/usr/bin/env bash # Upload this folder to the Hugging Face Hub. Usage: HF_TOKEN=hf_xxx ./upload.sh set -euo pipefail USER_NAME="${1:-}"; REPO="$USER_NAME/teencode-normalizer-v3" : "${HF_TOKEN:?Set HF_TOKEN to a write token from https://huggingface.co/settings/tokens}" pip install -q -U "huggingface_hub[cli]" cd "$(dirname "$0")" if command -v hf >/dev/null; then hf repo create "$REPO" --repo-type model --exist-ok --token "$HF_TOKEN" || true hf upload "$REPO" . . --repo-type model --token "$HF_TOKEN" --exclude "upload.sh" --commit-message "Upload teencode-normalizer v3" else huggingface-cli repo create teencode-normalizer-v3 --type model -y --token "$HF_TOKEN" || true huggingface-cli upload "$REPO" . . --repo-type model --token "$HF_TOKEN" --commit-message "Upload teencode-normalizer v3" fi echo "Done: https://huggingface.co/$REPO"