ecom-qa-bert_f / setup.bat
rnyx's picture
Upload 4 files
b2ea402 verified
@echo off
REM FILE 8: setup.bat — Windows Setup
REM Run this once to install everything, then use run.bat daily
echo ======================================================
echo E-Commerce QA with BERT — Setup (Windows)
echo ======================================================
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo ERROR: Python not found. Install from https://python.org
echo Make sure to check "Add Python to PATH" during install!
pause
exit /b 1
)
echo [1/5] Creating virtual environment...
python -m venv venv
call venv\Scripts\activate.bat
echo [2/5] Upgrading pip...
pip install --upgrade pip --quiet
echo [3/5] Installing PyTorch (CPU)...
pip install torch --index-url https://download.pytorch.org/whl/cpu --quiet
echo [4/5] Installing packages...
pip install flask gunicorn transformers scikit-learn numpy beautifulsoup4 requests --quiet
echo [5/5] Pre-downloading BERT model (~440MB, first time only)...
python -c "from transformers import BertForQuestionAnswering, BertTokenizer; print(' Downloading...'); BertTokenizer.from_pretrained('deepset/bert-base-cased-squad2'); BertForQuestionAnswering.from_pretrained('deepset/bert-base-cased-squad2'); print(' Done!')"
echo.
echo ======================================================
echo Setup complete! Run: run.bat
echo ======================================================
pause