Spaces:
Running
Running
| ο»Ώ# PowerShell deployment script for Windows | |
| # Run this script after setting up your HF token | |
| param( | |
| [Parameter(Mandatory=$true)] | |
| [string]$HF_TOKEN | |
| ) | |
| Write-Host "π Deploying OmniAvatar to Hugging Face Spaces..." -ForegroundColor Green | |
| # Set git remote with token authentication | |
| $gitPath = "C:\Program Files\Git\bin\git.exe" | |
| try { | |
| Write-Host "π‘ Configuring authentication..." -ForegroundColor Yellow | |
| & $gitPath remote set-url origin "https://bravedims:$HF_TOKEN@huggingface.co/spaces/bravedims/AI_Avatar_Chat.git" | |
| Write-Host "π€ Pushing to Hugging Face..." -ForegroundColor Yellow | |
| & $gitPath push origin main | |
| if ($LASTEXITCODE -eq 0) { | |
| Write-Host "β Deployment successful!" -ForegroundColor Green | |
| Write-Host "π Your space will be available at: https://huggingface.co/spaces/bravedims/AI_Avatar_Chat" -ForegroundColor Cyan | |
| Write-Host "β±οΈ Build time: ~10-15 minutes" -ForegroundColor Yellow | |
| Write-Host "" | |
| Write-Host "π Don't forget to add your ElevenLabs API key as a secret in the space settings!" -ForegroundColor Magenta | |
| } else { | |
| Write-Host "β Deployment failed. Check the error messages above." -ForegroundColor Red | |
| exit 1 | |
| } | |
| } | |
| catch { | |
| Write-Host "β Error during deployment: $($_.Exception.Message)" -ForegroundColor Red | |
| exit 1 | |
| } | |