Spaces:
Runtime error
Runtime error
Error: Error processing document with GOT-OCR (ZeroGPU): Numpy is not available
Browse files- requirements.txt +1 -1
- setup.sh +1 -1
- src/parsers/got_ocr_parser.py +2 -2
requirements.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
gradio==5.14.0
|
3 |
markdown==3.7
|
4 |
Pillow>=9.0.0,<11.0.0
|
5 |
-
numpy
|
6 |
|
7 |
# Image processing
|
8 |
opencv-python-headless>=4.5.0 # Headless version for server environments
|
|
|
2 |
gradio==5.14.0
|
3 |
markdown==3.7
|
4 |
Pillow>=9.0.0,<11.0.0
|
5 |
+
numpy<2.0.0
|
6 |
|
7 |
# Image processing
|
8 |
opencv-python-headless>=4.5.0 # Headless version for server environments
|
setup.sh
CHANGED
@@ -20,7 +20,7 @@ fi
|
|
20 |
|
21 |
# Install NumPy first as it's required by many other packages
|
22 |
echo "Installing NumPy..."
|
23 |
-
pip install -q -U numpy --no-cache-dir
|
24 |
echo "NumPy installed successfully"
|
25 |
|
26 |
# Install Python dependencies
|
|
|
20 |
|
21 |
# Install NumPy first as it's required by many other packages
|
22 |
echo "Installing NumPy..."
|
23 |
+
pip install -q -U "numpy<2.0.0" --no-cache-dir
|
24 |
echo "NumPy installed successfully"
|
25 |
|
26 |
# Install Python dependencies
|
src/parsers/got_ocr_parser.py
CHANGED
@@ -152,9 +152,9 @@ class GotOcrParser(DocumentParser):
|
|
152 |
logger.warning("Attempting to install NumPy...")
|
153 |
try:
|
154 |
import subprocess
|
155 |
-
# Try to install numpy
|
156 |
result = subprocess.run(
|
157 |
-
[sys.executable, "-m", "pip", "install", "-q", "numpy", "--no-cache-dir"],
|
158 |
capture_output=True,
|
159 |
text=True,
|
160 |
check=True
|
|
|
152 |
logger.warning("Attempting to install NumPy...")
|
153 |
try:
|
154 |
import subprocess
|
155 |
+
# Try to install numpy with explicit version constraint for compatibility with torchvision
|
156 |
result = subprocess.run(
|
157 |
+
[sys.executable, "-m", "pip", "install", "-q", "numpy<2.0.0", "--no-cache-dir"],
|
158 |
capture_output=True,
|
159 |
text=True,
|
160 |
check=True
|