-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_pipeline.bat
More file actions
44 lines (36 loc) · 1.47 KB
/
Copy pathrun_pipeline.bat
File metadata and controls
44 lines (36 loc) · 1.47 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
39
40
41
42
43
44
@echo off
setlocal
echo ============================================================
echo LASA Drug Detector — Full Pipeline Setup
echo ============================================================
:: Step 0: venv
if not exist venv (
echo [1/5] Creating virtual environment...
python -m venv venv
) else (
echo [1/5] Virtual environment already exists.
)
call venv\Scripts\activate.bat
:: Step 1: dependencies
echo [2/5] Installing dependencies...
pip install --quiet pdfplumber pandas numpy rapidfuzz jellyfish scikit-learn xgboost joblib fastapi uvicorn python-multipart jinja2 matplotlib seaborn tqdm
:: Step 2: data preprocessing
echo [3/5] Running data preprocessing (PDF extraction + negative sampling)...
python modules\01_data_preprocessing.py
if errorlevel 1 ( echo ERROR in data preprocessing & pause & exit /b 1 )
:: Step 3: feature engineering
echo [4/5] Running feature engineering...
python modules\02_feature_engineering.py
if errorlevel 1 ( echo ERROR in feature engineering & pause & exit /b 1 )
:: Step 4: model training
echo [5/5] Training ML model...
python modules\03_model_training.py
if errorlevel 1 ( echo ERROR in model training & pause & exit /b 1 )
echo.
echo ============================================================
echo Pipeline complete! Starting web server on http://localhost:8000
echo Press Ctrl+C to stop.
echo ============================================================
echo.
cd app
python -m uvicorn app:app --host 0.0.0.0 --port 8000 --reload