-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_app.bat
More file actions
38 lines (30 loc) · 1.04 KB
/
run_app.bat
File metadata and controls
38 lines (30 loc) · 1.04 KB
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
@echo off
title PCB Defect Detection System
color 0A
echo ============================================================
echo PCB Defect Detection System — Streamlit Web App
echo ============================================================
echo.
:: Change to the project root (same folder as this .bat file)
cd /d "%~dp0"
:: Use the virtual environment's Python/Streamlit
set VENV_PYTHON=%~dp0venv\Scripts\python.exe
set VENV_STREAMLIT=%~dp0venv\Scripts\streamlit.exe
:: Check venv exists
if not exist "%VENV_PYTHON%" (
echo [ERROR] Virtual environment not found at: venv\
echo Please run the following commands first:
echo py -3.12 -m venv venv
echo venv\Scripts\pip install -r requirements.txt
pause
exit /b 1
)
echo [1/2] Using virtual environment Python 3.12...
"%VENV_PYTHON%" --version
echo [2/2] Launching Streamlit app...
echo.
echo Open your browser at: http://localhost:8501
echo Press Ctrl+C in this window to stop the server.
echo.
"%VENV_STREAMLIT%" run app.py --server.port 8501 --server.headless false
pause