43 lines
1.1 KiB
Batchfile
43 lines
1.1 KiB
Batchfile
@echo off
|
|
chcp 65001 >nul
|
|
setlocal enabledelayedexpansion
|
|
|
|
echo ========================================
|
|
echo Pixelle-Video - API Server Launcher
|
|
echo ========================================
|
|
echo.
|
|
|
|
:: Set environment variables
|
|
set "PYTHON_HOME=%~dp0python\python311"
|
|
set "PATH=%PYTHON_HOME%;%PYTHON_HOME%\Scripts;%~dp0tools\ffmpeg\bin;%PATH%"
|
|
set "PROJECT_ROOT=%~dp0Pixelle-Video"
|
|
|
|
:: Change to project directory
|
|
cd /d "%PROJECT_ROOT%"
|
|
|
|
:: Set PYTHONPATH to project root for module imports
|
|
set "PYTHONPATH=%PROJECT_ROOT%"
|
|
|
|
:: Start API Server
|
|
echo [Starting] Launching Pixelle-Video API Server...
|
|
echo API will be available at: http://localhost:8000
|
|
echo API Documentation: http://localhost:8000/docs
|
|
echo.
|
|
echo Note: Configure API keys and settings in the Web UI.
|
|
echo Press Ctrl+C to stop the server
|
|
echo ========================================
|
|
echo.
|
|
|
|
"%PYTHON_HOME%\python.exe" -m uvicorn api.app:app --host 0.0.0.0 --port 8000
|
|
|
|
if errorlevel 1 (
|
|
echo.
|
|
echo [ERROR] Failed to start. Please check:
|
|
echo 1. Python is properly installed
|
|
echo 2. Dependencies are installed
|
|
echo 3. Port 8000 is not already in use
|
|
echo.
|
|
pause
|
|
)
|
|
|