Skip to content

Commit 485b943

Browse files
committed
fix: fix cli error
1 parent 7aa855c commit 485b943

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

rapid_table/main.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ def main():
198198
"Please install the rapidocr_onnxruntime by pip install rapidocr_onnxruntime."
199199
) from exc
200200

201-
table_engine = RapidTable(args.model_path)
201+
input_args = RapidTableInput(model_type=args.model_type)
202+
table_engine = RapidTable(input_args)
202203

203204
img = cv2.imread(args.img_path)
204205

@@ -217,13 +218,7 @@ def main():
217218
save_dir = img_path.resolve().parent
218219
save_html_path = save_dir / f"{Path(img_path).stem}.html"
219220
save_drawed_path = save_dir / f"vis_{Path(img_path).name}"
220-
viser(
221-
img_path,
222-
table_html_str,
223-
save_html_path,
224-
table_cell_bboxes,
225-
save_drawed_path,
226-
)
221+
viser(img_path, table_results, save_html_path, save_drawed_path)
227222

228223

229224
if __name__ == "__main__":

0 commit comments

Comments
 (0)