Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -434,10 +434,10 @@ class TableExtractionPipeline():
|
|
434 |
'''
|
435 |
image = Image.open(image_path).convert("RGB")
|
436 |
model, probas, bboxes_scaled = table_detector(image, THRESHOLD_PROBA=TD_THRESHOLD)
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
|
442 |
# try:
|
443 |
# st.write('Document: '+image_path.split('/')[-1])
|
|
|
434 |
'''
|
435 |
image = Image.open(image_path).convert("RGB")
|
436 |
model, probas, bboxes_scaled = table_detector(image, THRESHOLD_PROBA=TD_THRESHOLD)
|
437 |
+
|
438 |
+
if bboxes_scaled.nelement() == 0:
|
439 |
+
st.write('No table found in the pdf-page image')
|
440 |
+
return ''
|
441 |
|
442 |
# try:
|
443 |
# st.write('Document: '+image_path.split('/')[-1])
|