Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,10 +25,12 @@ else:
|
|
| 25 |
|
| 26 |
|
| 27 |
try:
|
| 28 |
-
|
| 29 |
-
print(f"Poppler version: {
|
| 30 |
except FileNotFoundError:
|
| 31 |
print("Poppler (pdfinfo) is not installed or not found in PATH.")
|
|
|
|
|
|
|
| 32 |
|
| 33 |
|
| 34 |
# Load Google Cloud Vision credentials from secret
|
|
|
|
| 25 |
|
| 26 |
|
| 27 |
try:
|
| 28 |
+
result = subprocess.run(["/usr/bin/pdfinfo", "-version"], capture_output=True, text=True, check=True)
|
| 29 |
+
print(f"Poppler version: {result.stdout}")
|
| 30 |
except FileNotFoundError:
|
| 31 |
print("Poppler (pdfinfo) is not installed or not found in PATH.")
|
| 32 |
+
except subprocess.CalledProcessError as e:
|
| 33 |
+
print(f"Poppler (pdfinfo) error: {e.stderr}")
|
| 34 |
|
| 35 |
|
| 36 |
# Load Google Cloud Vision credentials from secret
|