| @echo off |
| |
| |
| |
| |
| |
| |
| setlocal |
| cd /d "%~dp0" |
| |
| |
| set "HF_HOME=%~dp0models_cache\huggingface" |
| set "TRANSFORMERS_CACHE=%~dp0models_cache\huggingface" |
| set "TORCH_HOME=%~dp0models_cache\torch" |
| set "ULTRALYTICS_CONFIG_DIR=%~dp0models_cache\ultralytics" |
| set "PIP_CACHE_DIR=%~dp0models_cache\pip" |
|
|
| if not exist "models_cache" mkdir "models_cache" |
|
|
| if not exist ".venv\Scripts\activate.bat" ( |
| echo [1/3] No environment found — creating one in .venv ... |
| python -m venv .venv |
| if errorlevel 1 ( |
| echo ERROR: Python not found on PATH. Install Python 3.10+ and re-run this script. |
| pause |
| exit /b 1 |
| ) |
| ) |
|
|
| echo [2/3] Activating environment and installing/checking dependencies... |
| call .venv\Scripts\activate.bat |
| python -m pip install --upgrade pip >nul |
| pip install -r requirements.txt |
|
|
| echo [3/3] Launching app (first launch also downloads ~7GB of models into models_cache\)... |
| python app.py |
|
|
| pause |
|
|