wchen22's picture
Upload folder using huggingface_hub
63799d5 verified
raw
history blame contribute delete
473 Bytes
#!/usr/bin/env bash
set -euo pipefail
SPACE_ID="${1:-}"
if [[ -z "${SPACE_ID}" ]]; then
echo "usage: $0 <namespace/touchdown-compression-classifier>" >&2
exit 2
fi
if ! command -v hf >/dev/null 2>&1; then
echo "hf CLI not found. Install with: curl -LsSf https://hf.co/cli/install.sh | bash -s" >&2
exit 2
fi
hf auth whoami >/dev/null
hf repos create "${SPACE_ID}" --type space --space-sdk docker --exist-ok
hf upload "${SPACE_ID}" "$(dirname "$0")" --type space