Spaces:
Runtime error
Runtime error
resolving compatiability issue with docling and GOT OCR
Browse files- build.sh +4 -1
- requirements.txt +6 -4
- setup.sh +4 -1
build.sh
CHANGED
|
@@ -80,7 +80,10 @@ echo "Google Gemini API client installed successfully"
|
|
| 80 |
|
| 81 |
# Install GOT-OCR dependencies
|
| 82 |
echo "Installing GOT-OCR dependencies..."
|
| 83 |
-
|
|
|
|
|
|
|
|
|
|
| 84 |
echo "GOT-OCR dependencies installed successfully"
|
| 85 |
|
| 86 |
# Install Python dependencies
|
|
|
|
| 80 |
|
| 81 |
# Install GOT-OCR dependencies
|
| 82 |
echo "Installing GOT-OCR dependencies..."
|
| 83 |
+
# Install transformers and other dependencies first
|
| 84 |
+
pip install -q -U transformers==4.37.2 tiktoken==0.6.0 verovio==4.3.1 accelerate==0.28.0 safetensors==0.4.0
|
| 85 |
+
# Install torch and torchvision separately with --no-deps to avoid conflicts
|
| 86 |
+
pip install -q -U torch==2.0.1 torchvision==0.15.2 --no-deps
|
| 87 |
echo "GOT-OCR dependencies installed successfully"
|
| 88 |
|
| 89 |
# Install Python dependencies
|
requirements.txt
CHANGED
|
@@ -23,12 +23,14 @@ python-dotenv>=1.0.0
|
|
| 23 |
# Pin pydantic to resolve compatibility issues with gradio
|
| 24 |
pydantic==2.7.1
|
| 25 |
|
| 26 |
-
# GOT-OCR dependencies
|
| 27 |
-
torch==2.0.1
|
| 28 |
-
torchvision==0.15.2
|
| 29 |
transformers==4.37.2 # Exact version for GOT-OCR2
|
| 30 |
tiktoken==0.6.0
|
| 31 |
verovio==4.3.1
|
| 32 |
accelerate==0.28.0
|
| 33 |
safetensors>=0.4.0
|
| 34 |
-
packaging>=21.0 # For version comparison
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
# Pin pydantic to resolve compatibility issues with gradio
|
| 24 |
pydantic==2.7.1
|
| 25 |
|
| 26 |
+
# GOT-OCR dependencies - pinned versions to avoid conflicts
|
|
|
|
|
|
|
| 27 |
transformers==4.37.2 # Exact version for GOT-OCR2
|
| 28 |
tiktoken==0.6.0
|
| 29 |
verovio==4.3.1
|
| 30 |
accelerate==0.28.0
|
| 31 |
safetensors>=0.4.0
|
| 32 |
+
packaging>=21.0 # For version comparison
|
| 33 |
+
|
| 34 |
+
# Torch dependencies - install separately to avoid conflicts
|
| 35 |
+
# torch==2.0.1
|
| 36 |
+
# torchvision==0.15.2
|
setup.sh
CHANGED
|
@@ -20,7 +20,10 @@ echo "Python dependencies installed successfully"
|
|
| 20 |
|
| 21 |
# Install GOT-OCR dependencies
|
| 22 |
echo "Installing GOT-OCR dependencies..."
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
| 24 |
echo "GOT-OCR dependencies installed successfully"
|
| 25 |
|
| 26 |
# Install tesserocr with pip
|
|
|
|
| 20 |
|
| 21 |
# Install GOT-OCR dependencies
|
| 22 |
echo "Installing GOT-OCR dependencies..."
|
| 23 |
+
# Install transformers and other dependencies first
|
| 24 |
+
pip install -q -U transformers==4.37.2 tiktoken==0.6.0 verovio==4.3.1 accelerate==0.28.0 safetensors==0.4.0
|
| 25 |
+
# Install torch and torchvision separately with --no-deps to avoid conflicts
|
| 26 |
+
pip install -q -U torch==2.0.1 torchvision==0.15.2 --no-deps
|
| 27 |
echo "GOT-OCR dependencies installed successfully"
|
| 28 |
|
| 29 |
# Install tesserocr with pip
|