Spaces:
Running
Running
| # VR180 Converter Startup Script | |
| echo "π Starting VR180 Converter..." | |
| # Check if Python is installed | |
| if ! command -v python3 &> /dev/null; then | |
| echo "β Python 3 is not installed. Please install Python 3.9+ and try again." | |
| exit 1 | |
| fi | |
| # Check if Node.js is installed | |
| if ! command -v node &> /dev/null; then | |
| echo "β Node.js is not installed. Please install Node.js 16+ and try again." | |
| exit 1 | |
| fi | |
| # Check if FFmpeg is installed | |
| if ! command -v ffmpeg &> /dev/null; then | |
| echo "β οΈ FFmpeg is not installed. Video processing may not work properly." | |
| echo " Please install FFmpeg: https://ffmpeg.org/download.html" | |
| fi | |
| # Create necessary directories | |
| echo "π Creating directories..." | |
| mkdir -p backend/uploads backend/outputs | |
| # Install Python dependencies | |
| echo "π Installing Python dependencies..." | |
| cd backend | |
| pip install -r requirements.txt | |
| if [ $? -ne 0 ]; then | |
| echo "β Failed to install Python dependencies" | |
| exit 1 | |
| fi | |
| cd .. | |
| # Install Node.js dependencies | |
| echo "π¦ Installing Node.js dependencies..." | |
| cd frontend | |
| npm install | |
| if [ $? -ne 0 ]; then | |
| echo "β Failed to install Node.js dependencies" | |
| exit 1 | |
| fi | |
| cd .. | |
| # Build React app | |
| echo "π¨ Building React app..." | |
| cd frontend | |
| npm run build | |
| if [ $? -ne 0 ]; then | |
| echo "β Failed to build React app" | |
| exit 1 | |
| fi | |
| cd .. | |
| echo "β Setup complete!" | |
| echo "" | |
| echo "π― To start the application:" | |
| echo " Backend: cd backend && python app.py" | |
| echo " Frontend: cd frontend && npm start" | |
| echo "" | |
| echo "π Access the application at:" | |
| echo " Frontend: http://localhost:3000" | |
| echo " Backend: http://localhost:5000" | |
| echo "" | |
| echo "π For more information, see docs/README.md" |