Psc_predict / prepare_deploy.ps1
SEUyishu's picture
Upload 32 files
2279159 verified
# 准备 HuggingFace Docker 部署文件 (Windows PowerShell)
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host "Preparing Psc_Predict for HuggingFace" -ForegroundColor Cyan
Write-Host "==========================================" -ForegroundColor Cyan
# 创建 models 目录
if (-not (Test-Path "models")) {
New-Item -ItemType Directory -Path "models" | Out-Null
}
# 从 Psc_Predict 复制模型文件
Write-Host "`nCopying XGBoost models..." -ForegroundColor Yellow
Copy-Item "..\Psc_Predict\Psc_Predict\output\xgboost\*.pkl" -Destination "models\" -Force
# 检查模型文件
Write-Host "`nModels copied:" -ForegroundColor Green
Get-ChildItem models\
# 显示文件结构
Write-Host "`nDirectory structure:" -ForegroundColor Green
Write-Host "Psc_Predict_server/"
Write-Host "├── Dockerfile"
Write-Host "├── README.md"
Write-Host "├── requirements.txt"
Write-Host "├── server.py"
Write-Host "└── models/"
Get-ChildItem models\ | ForEach-Object { Write-Host " ├── $($_.Name)" }
Write-Host "`n==========================================" -ForegroundColor Cyan
Write-Host "Ready to deploy!" -ForegroundColor Green
Write-Host ""
Write-Host "Next steps:" -ForegroundColor Yellow
Write-Host "1. Create a new HuggingFace Space (Docker SDK)"
Write-Host "2. Upload all files to the Space"
Write-Host "3. Wait for build and deployment"
Write-Host ""
Write-Host "Or use git:" -ForegroundColor Yellow
Write-Host " git init"
Write-Host " git remote add origin https://huggingface.co/spaces/YOUR_USERNAME/psc-predict"
Write-Host " git add ."
Write-Host " git commit -m 'Initial commit'"
Write-Host " git push -u origin main"
Write-Host "==========================================" -ForegroundColor Cyan