Spaces:
Sleeping
Sleeping
Download deploy.sh from chaofenghui/chaofeng: direct link, hf CLI and curl.
- Browser
- Download file 697 Bytes
-
https://huggingface.co/spaces/chaofenghui/chaofeng/resolve/main/deploy.sh
- Command line
-
hf download hf://spaces/chaofenghui/chaofeng/deploy.sh
-
curl -L -o deploy.sh https://huggingface.co/spaces/chaofenghui/chaofeng/resolve/main/deploy.sh
697 Bytes
| # 超峰海外代理 — 自动部署到 HuggingFace Space | |
| # 用法: ./deploy.sh | |
| set -e | |
| SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" | |
| SPACE="chaofenghui/chaofeng" | |
| FILES=("app.py" "Dockerfile" "requirements.txt") | |
| echo "==> 检查 hf CLI..." | |
| if ! command -v hf &>/dev/null; then | |
| echo "请先安装: pip install huggingface_hub --break-system-packages" | |
| exit 1 | |
| fi | |
| echo "==> 检查认证..." | |
| if ! hf auth whoami &>/dev/null; then | |
| echo "请先登录: hf auth login --token hf_你的TOKEN --add-to-git-credential" | |
| exit 1 | |
| fi | |
| echo "==> 上传到 $SPACE ..." | |
| hf upload "$SPACE" "$SCRIPT_DIR" . --repo-type space | |
| echo "==> 部署完成: https://huggingface.co/proxy/chaofenghui-chaofeng.hf.space" | |