Spaces:
Sleeping
Sleeping
File size: 1,433 Bytes
b2ea402 | 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
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
|