File size: 1,295 Bytes
226ac39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
32
33
34
35
36
37
38
39
40
# Build and Deploy Script for Data Science Agent (Windows)

Write-Host "πŸš€ Building and Deploying Data Science Agent..." -ForegroundColor Cyan

# Step 1: Build React Frontend
Write-Host ""
Write-Host "πŸ“¦ Building React frontend..." -ForegroundColor Yellow
Set-Location FRRONTEEEND
npm.cmd install
if ($LASTEXITCODE -ne 0) {
    Write-Host "❌ Frontend npm install failed!" -ForegroundColor Red
    exit 1
}
npm.cmd run build
if ($LASTEXITCODE -ne 0) {
    Write-Host "❌ Frontend build failed!" -ForegroundColor Red
    exit 1
}
Set-Location ..

Write-Host ""
Write-Host "βœ… Frontend built successfully!" -ForegroundColor Green
Write-Host "   Built files are in: FRRONTEEEND\dist" -ForegroundColor Gray

# Step 2: Install Python dependencies
Write-Host ""
Write-Host "πŸ“¦ Installing Python dependencies..." -ForegroundColor Yellow
pip install -r requirements.txt
if ($LASTEXITCODE -ne 0) {
    Write-Host "⚠️ Some Python dependencies may have failed to install" -ForegroundColor Yellow
}

Write-Host ""
Write-Host "βœ… Build complete!" -ForegroundColor Green
Write-Host ""
Write-Host "To run the application:" -ForegroundColor Cyan
Write-Host "  python src\api\app.py" -ForegroundColor White
Write-Host ""
Write-Host "Access the app at: http://localhost:8080" -ForegroundColor Green