feat: optimize server model

This commit is contained in:
SWHL committed 2025-03-04 09:44:16 +08:00
1 parent a7650f6ad8
commit 4beb30ec79
7 files changed
+142 -12

No files matched your search

+7
View File
@@ -38,6 +38,13 @@ def get_engine(params: Optional[Dict[str, Any]] = None):
return engine
def test_server_rec():
engine = RapidOCR(params={"Global.lang_rec": "ch_server"})
result = engine(img_path)
assert result.txts is not None
assert result.txts[0] == "正品促销"
@pytest.mark.parametrize("cmd,gt", [(f"--img_path {img_path}", "正品促销")])
def test_cli(capsys, cmd, gt):
main(shlex.split(cmd))