Skip to content

Commit 2259228

Browse files
authored
Merge pull request #148 from xuanjinliang/fix-ocr_results-type-error
fix: ocr_results 文档描述出错,与代码类型写错
2 parents b0ba540 + 5cec3b0 commit 2259228

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ unitable是来源unitable的transformer模型,精度最高,暂仅支持pytor
8282
img_path = "https://raw.githubusercontent.com/RapidAI/RapidTable/refs/heads/main/tests/test_files/table.jpg"
8383
8484
ori_ocr_res = ocr_engine(img_path)
85-
ocr_results = [ori_ocr_res.boxes, ori_ocr_res.txts, ori_ocr_res.scores]
85+
ocr_results = [(ori_ocr_res.boxes, ori_ocr_res.txts, ori_ocr_res.scores)]
8686
8787
results = table_engine(img_path, ocr_results=ocr_results)
8888
results.vis(save_dir="outputs", save_name="vis")

rapid_table/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def _init_table_structer(self):
6969
def __call__(
7070
self,
7171
img_contents: Union[List[InputType], InputType],
72-
ocr_results: Optional[Tuple[np.ndarray, Tuple[str], Tuple[float]]] = None,
72+
ocr_results: Optional[List[Tuple[np.ndarray, Tuple[str], Tuple[float]]]] = None,
7373
batch_size: int = 1,
7474
) -> RapidTableOutput:
7575
s = time.perf_counter()

0 commit comments

Comments
 (0)