Spaces:
Runtime error
Runtime error
removing marker attempt 2
Browse files
README.md
CHANGED
|
@@ -121,6 +121,7 @@ build:
|
|
| 121 |
- **PyPdfium**: Best for standard PDFs with selectable text
|
| 122 |
- **Docling**: Best for complex document layouts
|
| 123 |
- **Gemini Flash**: Best for AI-powered conversions (requires API key)
|
|
|
|
| 124 |
3. Choose an OCR option based on your selected parser:
|
| 125 |
- **None**: No OCR processing (for documents with selectable text)
|
| 126 |
- **Tesseract**: Basic OCR using Tesseract
|
|
|
|
| 121 |
- **PyPdfium**: Best for standard PDFs with selectable text
|
| 122 |
- **Docling**: Best for complex document layouts
|
| 123 |
- **Gemini Flash**: Best for AI-powered conversions (requires API key)
|
| 124 |
+
- **GOT-OCR**: Best for high-quality OCR on images (JPG/PNG only)
|
| 125 |
3. Choose an OCR option based on your selected parser:
|
| 126 |
- **None**: No OCR processing (for documents with selectable text)
|
| 127 |
- **Tesseract**: Basic OCR using Tesseract
|
build.sh
CHANGED
|
@@ -80,10 +80,7 @@ echo "Google Gemini API client installed successfully"
|
|
| 80 |
|
| 81 |
# Install GOT-OCR dependencies
|
| 82 |
echo "Installing GOT-OCR dependencies..."
|
| 83 |
-
|
| 84 |
-
pip install -q -U torch==2.0.1 torchvision==0.15.2
|
| 85 |
-
pip install -q -U transformers==4.37.2
|
| 86 |
-
pip install -q -U tiktoken==0.6.0 verovio==4.3.1 accelerate==0.28.0 safetensors==0.4.0
|
| 87 |
echo "GOT-OCR dependencies installed successfully"
|
| 88 |
|
| 89 |
# Install Python dependencies
|
|
|
|
| 80 |
|
| 81 |
# Install GOT-OCR dependencies
|
| 82 |
echo "Installing GOT-OCR dependencies..."
|
| 83 |
+
pip install -q -U torch==2.0.1 torchvision==0.15.2 transformers==4.47.0 tiktoken==0.6.0 verovio==4.3.1 accelerate==0.28.0 safetensors==0.4.0
|
|
|
|
|
|
|
|
|
|
| 84 |
echo "GOT-OCR dependencies installed successfully"
|
| 85 |
|
| 86 |
# Install Python dependencies
|
requirements.txt
CHANGED
|
@@ -25,7 +25,7 @@ pydantic==2.7.1
|
|
| 25 |
# GOT-OCR dependencies
|
| 26 |
torch>=2.0.1
|
| 27 |
torchvision>=0.15.2
|
| 28 |
-
transformers
|
| 29 |
tiktoken>=0.6.0
|
| 30 |
verovio>=4.3.1
|
| 31 |
accelerate>=0.28.0
|
|
|
|
| 25 |
# GOT-OCR dependencies
|
| 26 |
torch>=2.0.1
|
| 27 |
torchvision>=0.15.2
|
| 28 |
+
transformers>=4.37.2,<4.48.0 # Pin to a compatible version for GOT-OCR
|
| 29 |
tiktoken>=0.6.0
|
| 30 |
verovio>=4.3.1
|
| 31 |
accelerate>=0.28.0
|
setup.sh
CHANGED
|
@@ -15,19 +15,12 @@ fi
|
|
| 15 |
# Install Python dependencies
|
| 16 |
echo "Installing Python dependencies..."
|
| 17 |
pip install -q -U pytesseract pillow opencv-python-headless pdf2image
|
| 18 |
-
echo "Python dependencies installed successfully"
|
| 19 |
-
|
| 20 |
-
# Install Gemini API client
|
| 21 |
-
echo "Installing Google Gemini API client..."
|
| 22 |
pip install -q -U google-genai
|
| 23 |
-
echo "
|
| 24 |
|
| 25 |
# Install GOT-OCR dependencies
|
| 26 |
echo "Installing GOT-OCR dependencies..."
|
| 27 |
-
|
| 28 |
-
pip install -q -U torch==2.0.1 torchvision==0.15.2
|
| 29 |
-
pip install -q -U transformers==4.37.2
|
| 30 |
-
pip install -q -U tiktoken==0.6.0 verovio==4.3.1 accelerate==0.28.0 safetensors==0.4.0
|
| 31 |
echo "GOT-OCR dependencies installed successfully"
|
| 32 |
|
| 33 |
# Install tesserocr with pip
|
|
|
|
| 15 |
# Install Python dependencies
|
| 16 |
echo "Installing Python dependencies..."
|
| 17 |
pip install -q -U pytesseract pillow opencv-python-headless pdf2image
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
pip install -q -U google-genai
|
| 19 |
+
echo "Python dependencies installed successfully"
|
| 20 |
|
| 21 |
# Install GOT-OCR dependencies
|
| 22 |
echo "Installing GOT-OCR dependencies..."
|
| 23 |
+
pip install -q -U torch==2.0.1 torchvision==0.15.2 transformers==4.47.0 tiktoken==0.6.0 verovio==4.3.1 accelerate==0.28.0 safetensors==0.4.0
|
|
|
|
|
|
|
|
|
|
| 24 |
echo "GOT-OCR dependencies installed successfully"
|
| 25 |
|
| 26 |
# Install tesserocr with pip
|