Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
0d632833
Unverified
Commit
0d632833
authored
Nov 22, 2024
by
Xiaomeng Zhao
Committed by
GitHub
Nov 22, 2024
Browse files
Merge pull request #1060 from myhloli/dev
fix(table): add null check for OCR result in rapid table prediction
parents
958168b3
18aa1a20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
magic_pdf/model/sub_modules/table/rapidtable/rapid_table.py
magic_pdf/model/sub_modules/table/rapidtable/rapid_table.py
+2
-0
No files found.
magic_pdf/model/sub_modules/table/rapidtable/rapid_table.py
View file @
0d632833
...
...
@@ -10,5 +10,7 @@ class RapidTableModel(object):
def
predict
(
self
,
image
):
ocr_result
,
_
=
self
.
ocr_engine
(
np
.
asarray
(
image
))
if
ocr_result
is
None
:
return
None
,
None
,
None
html_code
,
table_cell_bboxes
,
elapse
=
self
.
table_model
(
np
.
asarray
(
image
),
ocr_result
)
return
html_code
,
table_cell_bboxes
,
elapse
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment