Spaces:
Runtime error
Runtime error
Download scripts/push-space.sh from RalphThings/yue2-studio: direct link, hf CLI and curl.
- Browser
- Download file 872 Bytes
-
https://huggingface.co/spaces/RalphThings/yue2-studio/resolve/main/scripts/push-space.sh
- Command line
-
hf download hf://spaces/RalphThings/yue2-studio/scripts/push-space.sh
-
curl -L -o push-space.sh https://huggingface.co/spaces/RalphThings/yue2-studio/resolve/main/scripts/push-space.sh
872 Bytes
| # Push this repo to its Hugging Face Space with the right exclusions. | |
| # | |
| # Typing the exclude list by hand every time is how node_modules ends up in a | |
| # Space repo, and how a local .env full of tokens ends up public. This keeps | |
| # both impossible. | |
| set -euo pipefail | |
| SPACE=${1:-${HF_SPACE:-}} | |
| if [ -z "$SPACE" ]; then | |
| echo "usage: scripts/push-space.sh <user>/<space>" | |
| echo " or: HF_SPACE=<user>/<space> scripts/push-space.sh" | |
| exit 1 | |
| fi | |
| echo "Pushing to https://huggingface.co/spaces/$SPACE" | |
| hf upload "$SPACE" . --repo-type space \ | |
| --exclude \ | |
| "node_modules/**" \ | |
| ".next/**" \ | |
| ".git/**" \ | |
| "*.tsbuildinfo" \ | |
| "next-env.d.ts" \ | |
| ".env" \ | |
| ".env.local" \ | |
| ".DS_Store" \ | |
| "**/.DS_Store" | |
| echo | |
| echo "Watch the build: hf spaces logs $SPACE --build --follow" | |
| echo "Then the runtime: hf spaces logs $SPACE --follow" | |