Spaces:
Build error
Build error
| echo "Updating system package list..." | |
| sudo apt-get update -y | |
| echo "Installing Tesseract OCR and Poppler utilities..." | |
| sudo apt-get install -y tesseract-ocr tesseract-ocr-guj poppler-utils | |
| # Check if Python3 is installed | |
| if ! command -v python3 &>/dev/null; then | |
| echo "Python3 is not installed. Installing Python3..." | |
| sudo apt-get install -y python3 python3-pip | |
| else | |
| echo "Python3 is already installed." | |
| fi | |
| # Install Python dependencies from requirements.txt | |
| if [[ -f "requirements.txt" ]]; then | |
| echo "Installing Python dependencies from requirements.txt..." | |
| pip install --no-cache-dir -r requirements.txt | |
| else | |
| echo "Error: requirements.txt file not found!" | |
| exit 1 | |
| fi | |
| echo "Setup complete!" | |