File size: 1,425 Bytes
54ed165
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash

# Local AI Video Generator Startup Script

echo "🎬 Starting Local AI Video Generator..."
echo "========================================"
echo ""

# Check if Python is installed
if ! command -v python3 &> /dev/null; then
    echo "❌ Python 3 is not installed. Please install Python 3.9 or higher."
    exit 1
fi

# Check if virtual environment exists
if [ ! -d "venv" ]; then
    echo "πŸ“¦ Creating virtual environment..."
    python3 -m venv venv
fi

# Activate virtual environment
echo "πŸ”§ Activating virtual environment..."
source venv/bin/activate

# Check if requirements are installed
if [ ! -f "venv/.requirements_installed" ]; then
    echo "πŸ“₯ Installing dependencies (this may take a few minutes)..."
    echo ""
    echo "⚠️  Note: If you have an NVIDIA GPU, install PyTorch with CUDA first:"
    echo "   pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118"
    echo ""
    read -p "Press Enter to continue with installation..."
    
    pip install -r requirements_local.txt
    touch venv/.requirements_installed
    echo "βœ… Dependencies installed!"
fi

# Start the backend server
echo ""
echo "πŸš€ Starting backend server on http://localhost:5000"
echo "πŸ“ Open index_local.html in your browser to use the app"
echo ""
echo "Press Ctrl+C to stop the server"
echo "========================================"
echo ""

python backend_local.py