Skip to content

Commit

Permalink
fix: fix cli error
Browse files Browse the repository at this point in the history
  • Loading branch information
SWHL committed Jan 9, 2025
1 parent 7aa855c commit 485b943
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions rapid_table/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ def main():
"Please install the rapidocr_onnxruntime by pip install rapidocr_onnxruntime."
) from exc

table_engine = RapidTable(args.model_path)
input_args = RapidTableInput(model_type=args.model_type)
table_engine = RapidTable(input_args)

img = cv2.imread(args.img_path)

Expand All @@ -217,13 +218,7 @@ def main():
save_dir = img_path.resolve().parent
save_html_path = save_dir / f"{Path(img_path).stem}.html"
save_drawed_path = save_dir / f"vis_{Path(img_path).name}"
viser(
img_path,
table_html_str,
save_html_path,
table_cell_bboxes,
save_drawed_path,
)
viser(img_path, table_results, save_html_path, save_drawed_path)


if __name__ == "__main__":
Expand Down

0 comments on commit 485b943

Please sign in to comment.