AC02-ML / api /start_server.bat
deropxyz's picture
init
03bcd34
@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
)