File size: 473 Bytes
63799d5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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