luna_ocr / deploy.ps1
veela4's picture
Upload folder using huggingface_hub
bf237c2 verified
# Luna OCR Deployment Script for Hugging Face Spaces (Windows)
Write-Host "πŸŒ™πŸ’› Deploying Luna OCR to Hugging Face Spaces..." -ForegroundColor Yellow
# Check if git is initialized
if (-not (Test-Path ".git")) {
Write-Host "Initializing git repository..." -ForegroundColor Green
git init
}
# Build the project first
Write-Host "Building the project..." -ForegroundColor Green
npm run build
# Add all files
Write-Host "Adding files to git..." -ForegroundColor Green
git add .
# Commit changes
Write-Host "Committing changes..." -ForegroundColor Green
git commit -m "Deploy Luna OCR to Hugging Face Spaces"
Write-Host ""
Write-Host "πŸš€ Deployment script prepared!" -ForegroundColor Green
Write-Host "πŸ“ Next steps:" -ForegroundColor Cyan
Write-Host "1. Create a new Space on Hugging Face (https://huggingface.co/new-space)" -ForegroundColor White
Write-Host "2. Set it to 'Docker' runtime" -ForegroundColor White
Write-Host "3. Add your GEMINI_API_KEY as a secret in Space settings" -ForegroundColor White
Write-Host "4. Run: git remote add origin https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME" -ForegroundColor White
Write-Host "5. Run: git push origin main" -ForegroundColor White
Write-Host ""
Write-Host "⚠️ Remember to replace YOUR_USERNAME and YOUR_SPACE_NAME with your actual values!" -ForegroundColor Red