File size: 4,329 Bytes
13fd1dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# TechMatrix Solvers - ISL Translation System
# Windows Setup Script for Dependencies

Write-Host "πŸš€ TechMatrix Solvers - ISL Translation System" -ForegroundColor Cyan
Write-Host "Setting up Windows environment..." -ForegroundColor Green

# Check Python version
Write-Host "`nπŸ“‹ Checking Python installation..." -ForegroundColor Yellow
try {
    $pythonVersion = python --version 2>&1
    Write-Host "βœ… Found: $pythonVersion" -ForegroundColor Green
} catch {
    Write-Host "❌ Python not found. Please install Python 3.8+ first." -ForegroundColor Red
    exit 1
}

# Check pip
Write-Host "`nπŸ“¦ Checking pip installation..." -ForegroundColor Yellow
try {
    $pipVersion = pip --version 2>&1
    Write-Host "βœ… Found: $pipVersion" -ForegroundColor Green
} catch {
    Write-Host "❌ pip not found. Please install pip first." -ForegroundColor Red
    exit 1
}

# Upgrade pip
Write-Host "`nπŸ”„ Upgrading pip..." -ForegroundColor Yellow
pip install --upgrade pip

# Remove conflicting OpenCV packages
Write-Host "`n🧹 Cleaning up conflicting OpenCV packages..." -ForegroundColor Yellow
pip uninstall opencv-python opencv-python-headless opencv-contrib-python -y 2>$null

# Install PyTorch first (CPU version for Windows compatibility)
Write-Host "`n🧠 Installing PyTorch (CPU version)..." -ForegroundColor Yellow
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu

# Install OpenCV headless version specifically
Write-Host "`nπŸ“Έ Installing OpenCV (headless)..." -ForegroundColor Yellow
pip install opencv-python-headless==4.8.1.78

# Install other core dependencies
Write-Host "`nπŸ“š Installing core dependencies..." -ForegroundColor Yellow
pip install streamlit>=1.28.0
pip install numpy>=1.24.0
pip install pandas>=2.0.0
pip install Pillow>=9.0.0
pip install matplotlib==3.5.3
pip install scipy>=1.10.0
pip install scikit-image>=0.20.0
pip install tqdm>=4.65.0

# Install ML/AI dependencies
Write-Host "`nπŸ€– Installing AI/ML dependencies..." -ForegroundColor Yellow
pip install keras>=2.13.0
pip install seaborn>=0.12.0
pip install huggingface_hub>=0.16.0

# Install media processing
Write-Host "`n🎬 Installing media processing..." -ForegroundColor Yellow
pip install av>=10.0.0
pip install ffmpeg-python>=0.2.0

# Check FFmpeg installation
Write-Host "`nπŸŽ₯ Checking FFmpeg installation..." -ForegroundColor Yellow
try {
    $ffmpegVersion = ffmpeg -version 2>&1 | Select-String "version"
    Write-Host "βœ… FFmpeg found: $($ffmpegVersion -split ' ')[2]" -ForegroundColor Green
} catch {
    Write-Host "⚠️ FFmpeg not found. Installing via conda or manually download from https://ffmpeg.org/" -ForegroundColor Yellow
    Write-Host "   Trying conda install..." -ForegroundColor Yellow
    try {
        conda install ffmpeg -c conda-forge -y 2>$null
        Write-Host "βœ… FFmpeg installed via conda" -ForegroundColor Green
    } catch {
        Write-Host "❌ Please install FFmpeg manually from https://ffmpeg.org/" -ForegroundColor Red
    }
}

# Verify installation
Write-Host "`nπŸ” Verifying installation..." -ForegroundColor Yellow
python -c "

import sys

print(f'Python: {sys.version}')



try:

    import cv2

    print(f'βœ… OpenCV: {cv2.__version__}')

except Exception as e:

    print(f'❌ OpenCV: {e}')



try:

    import streamlit

    print(f'βœ… Streamlit: {streamlit.__version__}')

except Exception as e:

    print(f'❌ Streamlit: {e}')



try:

    import torch

    print(f'βœ… PyTorch: {torch.__version__}')

except Exception as e:

    print(f'❌ PyTorch: {e}')



try:

    import keras

    print(f'βœ… Keras: {keras.__version__}')

except Exception as e:

    print(f'❌ Keras: {e}')



try:

    import numpy as np

    print(f'βœ… NumPy: {np.__version__}')

except Exception as e:

    print(f'❌ NumPy: {e}')



try:

    import pandas as pd

    print(f'βœ… Pandas: {pd.__version__}')

except Exception as e:

    print(f'❌ Pandas: {e}')

"

Write-Host "`nπŸŽ‰ Setup completed!" -ForegroundColor Cyan
Write-Host "`nTo run the application:" -ForegroundColor Green
Write-Host "   streamlit run src/streamlit_app.py" -ForegroundColor White
Write-Host "`nTechMatrix Solvers Team - Ready to translate ISL! 🀟" -ForegroundColor Cyan