diff --git a/delivery/diag.bat b/delivery/diag.bat index 08b054a..1dede29 100644 --- a/delivery/diag.bat +++ b/delivery/diag.bat @@ -5,16 +5,18 @@ echo === 1. venv present? if exist venv\Scripts\python.exe (echo venv OK) else echo VENV MISSING - run install.bat first echo === 2. installed packages: if exist venv\Scripts\python.exe venv\Scripts\python.exe -m pip list 2>nul | findstr /i "fastapi uvicorn httpx docx openpyxl pptx multipart" -echo === 3. app.py location: +echo === 3. app.py / static location: if exist app.py echo app.py here (delivery) if exist ..\app.py echo app.py in parent folder -if not exist app.py if not exist ..\app.py echo app.py NOT FOUND anywhere - check the folder structure -echo === 4. starting service now (watch for errors; window stays open)... +if exist static echo static here (delivery) +if exist ..\static echo static in parent folder +echo === 4. starting service from kit root (watch for errors; window stays open)... set "SRV=%~dp0" -if not exist "%SRV%app.py" set "SRV=%~dp0.." +if not exist "%SRV%static" set "SRV=%~dp0.." +cd /d "%SRV%" set LT_URL=http://127.0.0.1:8010 set LLM_BASE_URL=http://127.0.0.1:11434/v1 set LLM_MODEL=qwen3-4b-instruct -"%~dp0venv\Scripts\python.exe" -m uvicorn app:app --host 127.0.0.1 --port 8011 --app-dir "%SRV%" -echo === service stopped. If there is an ImportError above - send a photo of this window +"%~dp0venv\Scripts\python.exe" -m uvicorn app:app --host 127.0.0.1 --port 8011 +echo === service stopped. If there is an error above - send a photo of this window pause \ No newline at end of file diff --git a/delivery/start_checker.bat b/delivery/start_checker.bat index b47e87d..73e2470 100644 --- a/delivery/start_checker.bat +++ b/delivery/start_checker.bat @@ -1,12 +1,13 @@ @echo off REM docchecker service + browser page: 127.0.0.1:8011 +REM Service runs with cwd = kit root (where app.py and static/ live) cd /d %~dp0 -REM app.py lives in the kit root; online archive keeps it in the parent folder set "SRV=%~dp0" -if not exist "%SRV%app.py" set "SRV=%~dp0.." +if not exist "%SRV%static" set "SRV=%~dp0.." +cd /d "%SRV%" set LT_URL=http://127.0.0.1:8010 set LLM_BASE_URL=http://127.0.0.1:11434/v1 set LLM_MODEL=qwen3-4b-instruct -start "docchecker" "%~dp0venv\Scripts\python.exe" -m uvicorn app:app --host 127.0.0.1 --port 8011 --app-dir "%SRV%" +start "docchecker" "%~dp0venv\Scripts\python.exe" -m uvicorn app:app --host 127.0.0.1 --port 8011 timeout /t 5 /nobreak >nul start http://127.0.0.1:8011 \ No newline at end of file