Download start-api.ps1 from Oak-Street/intent-classification: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/Oak-Street/intent-classification/resolve/main/start-api.ps1
- Command line
-
hf download hf://Oak-Street/intent-classification/start-api.ps1
-
curl -L -o start-api.ps1 https://huggingface.co/Oak-Street/intent-classification/resolve/main/start-api.ps1
1.57 kB
| # Quick Start Script for Intent Classification API | |
| # Run this to test locally before Docker deployment | |
| Write-Host "Intent Classification API - Quick Start" -ForegroundColor Cyan | |
| Write-Host "========================================" -ForegroundColor Cyan | |
| Write-Host "" | |
| # Check if model exists | |
| if (-not (Test-Path "finetuned_intent_falconsai")) { | |
| Write-Host "ERROR: Model directory 'finetuned_intent_falconsai' not found!" -ForegroundColor Red | |
| Write-Host "Please run the training script first:" -ForegroundColor Yellow | |
| Write-Host " python fine-tuning-falcon-ai.py" -ForegroundColor Yellow | |
| exit 1 | |
| } | |
| Write-Host "✓ Model directory found" -ForegroundColor Green | |
| # Check Python version | |
| $pythonVersion = python --version 2>&1 | |
| Write-Host "Python version: $pythonVersion" -ForegroundColor Cyan | |
| # Install dependencies | |
| Write-Host "" | |
| Write-Host "Installing deployment dependencies..." -ForegroundColor Cyan | |
| pip install -r requirements-deploy.txt | |
| if ($LASTEXITCODE -eq 0) { | |
| Write-Host "✓ Dependencies installed successfully" -ForegroundColor Green | |
| } else { | |
| Write-Host "✗ Failed to install dependencies" -ForegroundColor Red | |
| exit 1 | |
| } | |
| # Start the API | |
| Write-Host "" | |
| Write-Host "Starting the API server..." -ForegroundColor Cyan | |
| Write-Host "Access the API at: http://localhost:8000" -ForegroundColor Yellow | |
| Write-Host "Interactive docs: http://localhost:8000/docs" -ForegroundColor Yellow | |
| Write-Host "" | |
| Write-Host "Press Ctrl+C to stop the server" -ForegroundColor Gray | |
| Write-Host "" | |
| python app.py | |