File size: 534 Bytes
0828c2c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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 }