Spaces:
Sleeping
Sleeping
File size: 736 Bytes
6822363 |
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 |
#!/bin/bash
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!"
|