mirror of
https://github.com/opendatalab/MinerU.git
synced 2026-09-24 23:10:23 +08:00
Merge pull request #354 from papayalove/master
feat: add table recognition success detect
This commit is contained in:
@@ -36,7 +36,7 @@ from magic_pdf.model.pek_sub_modules.self_modify import ModifiedPaddleOCR
|
||||
from magic_pdf.model.pek_sub_modules.structeqtable.StructTableModel import StructTableModel
|
||||
|
||||
|
||||
def table_model_init(model_path, max_time=400, _device_='cpu'):
|
||||
def table_model_init(model_path, max_time, _device_='cpu'):
|
||||
table_model = StructTableModel(model_path, max_time=max_time, device=_device_)
|
||||
return table_model
|
||||
|
||||
@@ -297,6 +297,5 @@ class CustomPEKModel:
|
||||
if latex_code and latex_code.strip().endswith('end{tabular}'):
|
||||
layout["latex"] = latex_code
|
||||
else:
|
||||
print(latex_code)
|
||||
logger.warning(f"------------table recognition processing fails----------")
|
||||
return layout_res
|
||||
|
||||
Reference in New Issue
Block a user