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
|