Skip to content

Commit e818e31

Browse files
authored
Merge pull request #17 from wjh2012/main
Feat: explicit is_rec parameter
2 parents 5e160fc + 2b947ec commit e818e31

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

paddleocr_convert/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ def __call__(
2121
save_dir: InputType,
2222
txt_path: Optional[str] = None,
2323
is_del_raw: bool = False,
24+
is_rec: Optional[bool] = None
2425
) -> str:
2526
model_name = Path(model_path).stem
26-
is_rec = "rec" in model_name
27+
28+
if is_rec is None:
29+
is_rec = "rec" in model_name
2730

2831
if is_rec and not txt_path:
2932
raise ConvertError("Please give the txt url.")

0 commit comments

Comments
 (0)