File size: 1,318 Bytes
03bcd34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
41
42
43
44
45
46
47
48
49
50
51
@echo off
echo ========================================
echo   Starting FastAPI Server
echo ========================================
echo.

REM Check if Python is installed
python --version >nul 2>&1
if errorlevel 1 (
    echo ERROR: Python is not installed or not in PATH
    echo Please run: install_requirements.bat first
    pause
    exit /b 1
)

REM Check if model exists
if not exist "..\models\model_pipeline_improved.joblib" (
    if not exist "..\models\model_pipeline.joblib" (
        echo WARNING: Model file not found!
        echo Please ensure model file exists in ../models/ directory
        echo.
    )
)

echo Starting server at http://localhost:8000
echo.
echo Available endpoints:
echo   - HTML Test Interface: Open index.html in browser
echo   - API Documentation: http://localhost:8000/docs
echo   - Health Check: http://localhost:8000/health
echo.
echo Press Ctrl+C to stop the server
echo ========================================
echo.

REM Start the server
python main.py

if errorlevel 1 (
    echo.
    echo ERROR: Server failed to start
    echo Please check the error messages above
    echo.
    echo Common issues:
    echo   1. Port 8000 is already in use
    echo   2. Missing dependencies (run: install_requirements.bat)
    echo   3. Model file not found
    pause
    exit /b 1
)