Spaces:
Running on Zero
Running on Zero
| # Deploy ProfillyBot to Hugging Face Space: MinhDS/ProfillyBot | |
| # Usage: | |
| # $env:HF_TOKEN = "hf_xxx" # token with Write access | |
| # .\scripts\deploy_hf_space.ps1 | |
| $ErrorActionPreference = "Stop" | |
| $Root = Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Path) | |
| Set-Location $Root | |
| if (-not $env:HF_TOKEN -and -not $env:HUGGINGFACE_HUB_TOKEN) { | |
| Write-Error "Set HF_TOKEN (https://huggingface.co/settings/tokens) then re-run." | |
| } | |
| python "$Root\scripts\deploy_hf_space.py" | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |