Xernive's picture
fix: revert to API client with better error handling (Hunyuan3D not pip-installable)
26f8b9a
# Simple V2 Deployment Script
Write-Host "Deploying V2 to HuggingFace Space..." -ForegroundColor Cyan
$SPACE_URL = "https://huggingface.co/spaces/Xernive/game-asset-generator-pipeline"
$SPACE_DIR = "game-asset-generator-pipeline"
$SOURCE_DIR = "huggingface-space-v2"
# Clone or update Space
if (Test-Path $SPACE_DIR) {
Write-Host "Updating existing Space..." -ForegroundColor Yellow
Set-Location $SPACE_DIR
git pull
Set-Location ..
} else {
Write-Host "Cloning Space..." -ForegroundColor Gray
git clone $SPACE_URL
}
# Clean and copy files
Write-Host "Copying files..." -ForegroundColor Gray
Get-ChildItem $SPACE_DIR -Exclude ".git" | Remove-Item -Recurse -Force
Copy-Item "$SOURCE_DIR/app.py" "$SPACE_DIR/" -Force
Copy-Item "$SOURCE_DIR/requirements.txt" "$SPACE_DIR/" -Force
Copy-Item "$SOURCE_DIR/Dockerfile" "$SPACE_DIR/" -Force
Copy-Item "$SOURCE_DIR/.gitignore" "$SPACE_DIR/" -Force
Copy-Item "$SOURCE_DIR/README.md" "$SPACE_DIR/" -Force
Copy-Item "$SOURCE_DIR/core" "$SPACE_DIR/" -Recurse -Force
Copy-Item "$SOURCE_DIR/generators" "$SPACE_DIR/" -Recurse -Force
Copy-Item "$SOURCE_DIR/processors" "$SPACE_DIR/" -Recurse -Force
Copy-Item "$SOURCE_DIR/utils" "$SPACE_DIR/" -Recurse -Force
Copy-Item "$SOURCE_DIR/scripts" "$SPACE_DIR/" -Recurse -Force
# Commit and push
Write-Host "Pushing to HuggingFace..." -ForegroundColor Green
Set-Location $SPACE_DIR
git add .
git commit -m "Deploy V2 with api_name fix"
git push --force
Set-Location ..
Write-Host "Deployment complete!" -ForegroundColor Green
Write-Host "Space URL: $SPACE_URL" -ForegroundColor Cyan