$ErrorActionPreference = "Stop" Set-Location $PSScriptRoot Write-Host "Publishing public Hugging Face research release v1.0.0" Write-Host "Target: PureOne/dirichlet-tree-polya-equality-rigidity" $python = $null if (Get-Command py -ErrorAction SilentlyContinue) { $python = "py" } elseif (Get-Command python -ErrorAction SilentlyContinue) { $python = "python" } else { throw "Python was not found in PATH." } & $python -c "import huggingface_hub" 2>$null if ($LASTEXITCODE -ne 0) { & $python -m pip install --upgrade "huggingface_hub>=0.30" if ($LASTEXITCODE -ne 0) { throw "Failed to install huggingface_hub." } } & $python publish_huggingface.py if ($LASTEXITCODE -ne 0) { throw "Publication failed with exit code $LASTEXITCODE." }