File size: 1,908 Bytes
67f25fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
@echo off
REM Multi-Lingual Product Catalog Translator Setup Script (Windows)
REM This script sets up the development environment for the project

echo 🌐 Setting up Multi-Lingual Product Catalog Translator...
echo ==================================================

REM Check Python version
echo πŸ“‹ Checking Python version...
python --version
if %errorlevel% neq 0 (
    echo ❌ Python is not installed or not in PATH. Please install Python 3.9+
    pause
    exit /b 1
)

REM Create virtual environment
echo πŸ”§ Creating virtual environment...
python -m venv venv

REM Activate virtual environment
echo πŸ”§ Activating virtual environment...
call venv\Scripts\activate.bat

REM Upgrade pip
echo ⬆️ Upgrading pip...
python -m pip install --upgrade pip

REM Install backend dependencies
echo πŸ“¦ Installing backend dependencies...
cd backend
pip install -r requirements.txt
cd ..

REM Install frontend dependencies
echo πŸ“¦ Installing frontend dependencies...
cd frontend
pip install -r requirements.txt
cd ..

REM Create data directory
echo πŸ“ Creating data directory...
if not exist "data" mkdir data

REM Copy environment file
echo βš™οΈ Setting up environment configuration...
if not exist ".env" (
    copy .env.example .env
    echo βœ… Created .env file from .env.example
    echo πŸ“ Please review and modify .env file as needed
)

REM Initialize database
echo πŸ—„οΈ Initializing database...
cd backend
python -c "from database import DatabaseManager; db = DatabaseManager(); db.initialize_database(); print('βœ… Database initialized successfully')"
cd ..

echo.
echo πŸŽ‰ Setup completed successfully!
echo.
echo To start the application:
echo 1. Start backend:  cd backend ^&^& python main.py
echo 2. Start frontend: cd frontend ^&^& streamlit run app.py
echo.
echo Then open your browser and go to http://localhost:8501
echo.
echo πŸ“š For more information, see README.md

pause