Commit 18aa1a20 authored by myhloli's avatar myhloli
Browse files

fix(table): add null check for OCR result in rapid table prediction

- Add a null check for OCR result in the predict method
- Return None values if OCR result is None to prevent further processing
parent c6627b68
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment