Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ from streamlit_sortables import sort_items
|
|
| 14 |
import subprocess
|
| 15 |
from tqdm import tqdm
|
| 16 |
|
| 17 |
-
# Check if /usr/bin/pdfinfo exists
|
| 18 |
if os.path.exists("/usr/bin/pdfinfo"):
|
| 19 |
print("pdfinfo exists at /usr/bin/pdfinfo")
|
| 20 |
# Check the file permissions
|
|
@@ -24,15 +24,6 @@ else:
|
|
| 24 |
print("pdfinfo does not exist at /usr/bin/pdfinfo")
|
| 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
|
| 37 |
credentials_json = os.getenv("GOOGLE_CREDENTIALS_JSON")
|
| 38 |
if credentials_json:
|
|
|
|
| 14 |
import subprocess
|
| 15 |
from tqdm import tqdm
|
| 16 |
|
| 17 |
+
# Check if /usr/bin/pdfinfo exists - Removed version check
|
| 18 |
if os.path.exists("/usr/bin/pdfinfo"):
|
| 19 |
print("pdfinfo exists at /usr/bin/pdfinfo")
|
| 20 |
# Check the file permissions
|
|
|
|
| 24 |
print("pdfinfo does not exist at /usr/bin/pdfinfo")
|
| 25 |
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
# Load Google Cloud Vision credentials from secret
|
| 28 |
credentials_json = os.getenv("GOOGLE_CREDENTIALS_JSON")
|
| 29 |
if credentials_json:
|