File size: 1,379 Bytes
bf237c2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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