π Awesome OCR multiple programing languages toolkits based on ONNX Runtime, OpenVINO, MNN, PaddlePaddle, TensorRT and PyTorch.
chore: update files
SWHL6189f611b62e
diff --git a/python/demo.py b/python/demo.pyindex 40cc3d9..e855434 100644--- a/python/demo.py+++ b/python/demo.py@@ -15,7 +15,10 @@ from rapidocr import RapidOCR, VisRes# yaml_path = "tests/test_files/config.yaml"# engine = RapidOCR(config_path=yaml_path)-engine = RapidOCR()+engine = engine = RapidOCR(+ params={"Global.with_onnx": True, "EngineConfig.onnxruntime.use_cuda": True}+)+# engine = RapidOCR(params={"Global.with_openvino": True})vis = VisRes()image_path = "tests/test_files/ch_en_num.jpg"diff --git a/python/rapidocr/ch_ppocr_cls/main.py b/python/rapidocr/ch_ppocr_cls/main.pyindex 7e8974a..e57b8e0 100644--- a/python/rapidocr/ch_ppocr_cls/main.py+++ b/python/rapidocr/ch_ppocr_cls/main.py@@ -19,7 +19,7 @@ from typing import Any, Dict, List, Unionimport cv2import numpy as np-from rapidocr.inference_engine import get_engine+from rapidocr.inference_engine.base import get_enginefrom .utils import ClsPostProcess, TextClsOutputdiff --git a/python/rapidocr/ch_ppocr_det/main.py b/python/rapidocr/ch_ppocr_det/main.pyindex 58a1cf9..c432eb0 100644--- a/python/rapidocr/ch_ppocr_det/main.py+++ b/python/rapidocr/ch_ppocr_det/main.py@@ -19,7 +19,7 @@ from typing import Any, Dict, Listimport numpy as np-from rapidocr.inference_engine import get_engine+from rapidocr.inference_engine.base import get_enginefrom .utils import DBPostProcess, DetPreProcess, TextDetOutputdiff --git a/python/rapidocr/ch_ppocr_rec/main.py b/python/rapidocr/ch_ppocr_rec/main.pyindex 866f232..c138217 100644--- a/python/rapidocr/ch_ppocr_rec/main.py+++ b/python/rapidocr/ch_ppocr_rec/main.py@@ -19,11 +19,12 @@ from typing import Any, Dictimport cv2import numpy as np-from rapidocr.inference_engine import get_engine+from rapidocr.inference_engine.base import get_enginefrom .utils import CTCLabelDecode, TextRecInput, TextRecOutputDEFAULT_DICT_PATH = str(Path(__file__).parent.parent / "models" / "ppocr_keys_v1.txt")+DEFAULT_DICT_URL = "https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/ch_PP-OCRv4_rec_infer/ppocr_keys_v1.txt"class TextRecognizer:@@ -36,6 +37,9 @@ class TextRecognizer:dict_path = config.get("rec_keys_path", None)character_dict_path = dict_path if dict_path else DEFAULT_DICT_PATH+ if not Path(character_dict_path).exists():+ self.session.download_file(DEFAULT_DICT_URL, character_dict_path)+self.postprocess_op = CTCLabelDecode(character=character, character_path=character_dict_path)diff --git a/python/rapidocr/config.yaml b/python/rapidocr/config.yamlindex 83ffc81..7e82857 100644--- a/python/rapidocr/config.yaml+++ b/python/rapidocr/config.yaml@@ -1,6 +1,7 @@Global:lang: "ch"text_score: 0.5+use_det: trueuse_cls: trueuse_rec: true@@ -60,6 +61,7 @@ Cls:Rec:model_path: models/ch_PP-OCRv4_rec_infer.onnx+ rec_keys_path: models/ppocr_keys_v1.txtrec_img_shape: [3, 48, 320]rec_batch_num: 6diff --git a/python/rapidocr/inference_engine/MODEL_URL.yaml b/python/rapidocr/inference_engine/MODEL_URL.yamlindex 29fc6b6..e35ff56 100644--- a/python/rapidocr/inference_engine/MODEL_URL.yaml+++ b/python/rapidocr/inference_engine/MODEL_URL.yaml@@ -27,18 +27,42 @@ openvino:en_PP-OCRv3_det_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/det/en_PP-OCRv3_det_infer.onnxMultilingual_PP-OCRv3_det_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/det/Multilingual_PP-OCRv3_det_infer.onnxrec:- arabic_PP-OCRv4_rec_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/arabic_PP-OCRv4_rec_infer.onnx- ch_PP-OCRv4_rec_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/ch_PP-OCRv4_rec_infer.onnx- chinese_cht_PP-OCRv3_rec_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/chinese_cht_PP-OCRv3_rec_infer.onnx- cyrillic_PP-OCRv3_rec_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/cyrillic_PP-OCRv3_rec_infer.onnx- devanagari_PP-OCRv4_rec_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/devanagari_PP-OCRv4_rec_infer.onnx- en_PP-OCRv4_rec_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/en_PP-OCRv4_rec_infer.onnx- japan_PP-OCRv4_rec_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/japan_PP-OCRv4_rec_infer.onnx- ka_PP-OCRv4_rec_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/ka_PP-OCRv4_rec_infer.onnx- korean_PP-OCRv4_rec_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/korean_PP-OCRv4_rec_infer.onnx- latin_PP-OCRv3_rec_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/latin_PP-OCRv3_rec_infer.onnx- ta_PP-OCRv4_rec_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/ta_PP-OCRv4_rec_infer.onnx- te_PP-OCRv4_rec_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/te_PP-OCRv4_rec_infer.onnx+ arabic_PP-OCRv4_rec_infer:+ model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/arabic_PP-OCRv4_rec_infer.onnx+ dict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/arabic_PP-OCRv4_rec_infer/arabic_dict.txt+ ch_PP-OCRv4_rec_infer:+ model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/ch_PP-OCRv4_rec_infer.onnx+ dict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/ch_PP-OCRv4_rec_infer/ppocr_keys_v1.txt+ chinese_cht_PP-OCRv3_rec_infer:+ model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/chinese_cht_PP-OCRv3_rec_infer.onnx+ dict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/chinese_cht_PP-OCRv3_rec_infer/chinese_cht_dict.txt+ cyrillic_PP-OCRv3_rec_infer:+ model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/cyrillic_PP-OCRv3_rec_infer.onnx+ dict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/cyrillic_PP-OCRv3_rec_infer/cyrillic_dict.txt+ devanagari_PP-OCRv4_rec_infer:+ model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/devanagari_PP-OCRv4_rec_infer.onnx+ dict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/devanagari_PP-OCRv4_rec_infer/devanagari_dict.txt+ en_PP-OCRv4_rec_infer:+ model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/en_PP-OCRv4_rec_infer.onnx+ dict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/en_PP-OCRv4_rec_infer/en_dict.txt+ japan_PP-OCRv4_rec_infer:+ model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/japan_PP-OCRv4_rec_infer.onnx+ dict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/japan_PP-OCRv4_rec_infer/japan_dict.txt+ ka_PP-OCRv4_rec_infer:+ model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/ka_PP-OCRv4_rec_infer.onnx+ dict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/kannada_PP-OCRv4_rec_infer/ka_dict.txt+ korean_PP-OCRv4_rec_infer:+ model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/korean_PP-OCRv4_rec_infer.onnx+ dict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/korean_PP-OCRv4_rec_infer/korean_dict.txt+ latin_PP-OCRv3_rec_infer:+ model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/latin_PP-OCRv3_rec_infer.onnx+ dict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/latin_PP-OCRv3_rec_infer/latin_dict.txt+ ta_PP-OCRv4_rec_infer:+ model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/ta_PP-OCRv4_rec_infer.onnx+ dict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/ta_PP-OCRv4_rec_infer/ta_dict.txt+ te_PP-OCRv4_rec_infer:+ model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/rec/te_PP-OCRv4_rec_infer.onnx+ dict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/te_PP-OCRv4_rec_infer/te_dict.txtcls:ch_ppocr_mobile_v2.0_cls_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/cls/ch_ppocr_mobile_v2.0_cls_infer.onnx@@ -52,11 +76,9 @@ paddlepaddle:arabic_PP-OCRv4_rec_infer:model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/arabic_PP-OCRv4_rec_inferdict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/arabic_PP-OCRv4_rec_infer/arabic_dict.txt-ch_PP-OCRv4_rec_infer:model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/ch_PP-OCRv4_rec_inferdict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/ch_PP-OCRv4_rec_infer/ppocr_keys_v1.txt-chinese_cht_PP-OCRv3_rec_infer:model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/chinese_cht_PP-OCRv3_rec_inferdict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/chinese_cht_PP-OCRv3_rec_infer/chinese_cht_dict.txt@@ -88,7 +110,7 @@ paddlepaddle:model_dir: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/te_PP-OCRv4_rec_inferdict_url: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/rec/te_PP-OCRv4_rec_infer/te_dict.txtcls:- ch_ppocr_mobile_v2.0_cls_infer.onnx: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/cls/ch_ppocr_mobile_v2.0_cls_infer.onnx+ ch_ppocr_mobile_v2.0_cls_infer: https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/paddle/PP-OCRv4/cls/ch_ppocr_mobile_v2_cls_infer/inference.pdiparamstorch:PP-OCRv4:diff --git a/python/rapidocr/inference_engine/__init__.py b/python/rapidocr/inference_engine/__init__.pyindex eda5cf5..ab1f42d 100644--- a/python/rapidocr/inference_engine/__init__.py+++ b/python/rapidocr/inference_engine/__init__.py@@ -1,57 +1,6 @@# -*- encoding: utf-8 -*-# @Author: SWHL# @Contact: [email protected]-from enum import Enum--from omegaconf import DictConfig-from .onnxruntime import OrtInferSession-from .openvino import OpenVINOInferSessionfrom .paddlepaddle import PaddleInferSessionfrom .torch import TorchInferSession---class Engine(Enum):- ONNXRUNTIME = "onnxruntime"- OPENVINO = "openvino"- PADDLE = "paddlepaddle"- TORCH = "torch"---def get_engine(engine_name: str):- print("engine_name:", engine_name)-- if engine_name == Engine.ONNXRUNTIME.value:- return OrtInferSession-- if engine_name == Engine.OPENVINO.value:- return OpenVINOInferSession-- if engine_name == Engine.PADDLE.value:- return PaddleInferSession-- if engine_name == Engine.TORCH.value:- return TorchInferSession-- raise ValueError(f"Unsupported engine: {engine_name}")---def get_engine_name(config: DictConfig) -> str:- with_onnx = config.Global.with_onnx- with_openvino = config.Global.with_openvino- with_paddle = config.Global.with_paddle- with_torch = config.Global.with_torch-- if with_onnx:- return Engine.ONNXRUNTIME.value-- if with_openvino:- return Engine.OPENVINO.value-- if with_paddle:- return Engine.PADDLE.value-- if with_torch:- return Engine.TORCH.value-- return Engine.ONNXRUNTIME.valuediff --git a/python/rapidocr/inference_engine/base.py b/python/rapidocr/inference_engine/base.pyindex 0220bd1..82bfe6a 100644--- a/python/rapidocr/inference_engine/base.py+++ b/python/rapidocr/inference_engine/base.py@@ -2,21 +2,82 @@# @Author: SWHL# @Contact: [email protected]import abc+from enum import Enumfrom pathlib import Pathfrom typing import Unionimport numpy as npimport requests-from omegaconf import OmegaConf+from omegaconf import DictConfig, OmegaConffrom tqdm import tqdm+from ..utils.logger import Logger+cur_dir = Path(__file__).resolve().parentMODEL_URL_PATH = cur_dir / "MODEL_URL.yaml"+logger = Logger(logger_name=__name__).get_log()+++class Engine(Enum):+ ONNXRUNTIME = "onnxruntime"+ OPENVINO = "openvino"+ PADDLE = "paddlepaddle"+ TORCH = "torch"+++def get_engine(engine_name: str):+ logger.info("Using engine_name: %s", engine_name)++ if engine_name == Engine.ONNXRUNTIME.value:+ from .onnxruntime import OrtInferSession++ return OrtInferSession++ if engine_name == Engine.OPENVINO.value:+ from .openvino import OpenVINOInferSession++ return OpenVINOInferSession++ if engine_name == Engine.PADDLE.value:+ from .paddlepaddle import PaddleInferSession++ return PaddleInferSession++ if engine_name == Engine.TORCH.value:+ from .torch import TorchInferSession++ return TorchInferSession++ raise ValueError(f"Unsupported engine: {engine_name}")+++def get_engine_name(config: DictConfig) -> str:+ with_onnx = config.Global.with_onnx+ with_openvino = config.Global.with_openvino+ with_paddle = config.Global.with_paddle+ with_torch = config.Global.with_torch++ if with_onnx:+ return Engine.ONNXRUNTIME.value++ if with_openvino:+ return Engine.OPENVINO.value++ if with_paddle:+ return Engine.PADDLE.value++ if with_torch:+ return Engine.TORCH.value++ return Engine.ONNXRUNTIME.value++class InferSession(abc.ABC):model_info = OmegaConf.load(MODEL_URL_PATH)DEFAULT_MODE_PATH = cur_dir.parent / "models"+ logger = Logger(logger_name=__name__).get_log()@abc.abstractmethoddef __init__(self, config):@@ -44,9 +105,9 @@ class InferSession(abc.ABC):def have_key(self, key: str = "character") -> bool:pass- @staticmethod- def download_file(url: str, save_path: Union[str, Path]):- print(f"Downloading model from {url} to {save_path}")+ @classmethod+ def download_file(cls, url: str, save_path: Union[str, Path]):+ cls.logger.info("Downloading model from %s to %s", url, save_path)response = requests.get(url, stream=True, timeout=60)status_code = response.status_codediff --git a/python/rapidocr/inference_engine/openvino.py b/python/rapidocr/inference_engine/openvino.pyindex dd71975..eaa8bf0 100644--- a/python/rapidocr/inference_engine/openvino.py+++ b/python/rapidocr/inference_engine/openvino.py@@ -13,6 +13,8 @@ from .base import InferSessionclass OpenVINOInferSession(InferSession):def __init__(self, config: DictConfig):+ super().__init__(config)+core = Core()self._verify_model(config["model_path"])diff --git a/python/rapidocr/main.py b/python/rapidocr/main.pyindex 06bd012..884d35c 100644--- a/python/rapidocr/main.py+++ b/python/rapidocr/main.py@@ -12,7 +12,7 @@ from .cal_rec_boxes import CalRecBoxesfrom .ch_ppocr_cls import TextClassifier, TextClsOutputfrom .ch_ppocr_det import TextDetector, TextDetOutputfrom .ch_ppocr_rec import TextRecInput, TextRecognizer, TextRecOutput-from .inference_engine import get_engine_name+from .inference_engine.base import get_engine_namefrom .utils import (LoadImage,Logger,@@ -39,6 +39,7 @@ class RapidOCR:else:config = ParseParams.load(DEFAULT_CFG_PATH)config = ParseParams.update_model_path(config)+ config = ParseParams.update_dict_path(config)if params:config = ParseParams.update_batch(config, params)diff --git a/python/rapidocr/utils/logger.py b/python/rapidocr/utils/logger.pyindex 408685c..4bd91cc 100644--- a/python/rapidocr/utils/logger.py+++ b/python/rapidocr/utils/logger.py@@ -8,12 +8,11 @@ class Logger:def __init__(self, log_level=logging.DEBUG, logger_name=None):self.logger = logging.getLogger(logger_name)self.logger.setLevel(log_level)+ self.logger.propagate = Falsefmt = "[%(levelname)s] %(asctime)s %(filename)s:%(lineno)d: %(message)s"formatter = logging.Formatter(fmt)- self.logger.handlers.clear()-if not self.logger.handlers:ch = logging.StreamHandler()ch.setLevel(log_level)diff --git a/python/rapidocr/utils/parse_parameters.py b/python/rapidocr/utils/parse_parameters.pyindex d6e5639..289fb00 100644--- a/python/rapidocr/utils/parse_parameters.py+++ b/python/rapidocr/utils/parse_parameters.py@@ -122,6 +122,13 @@ class ParseParams(OmegaConf):cls.update(cfg, f"Rec.{key}", str(root_dir / cfg.Rec[key]))return cfg+ @classmethod+ def update_dict_path(+ cls, cfg: DictConfig, key: str = "rec_keys_path"+ ) -> DictConfig:+ cls.update(cfg, f"Rec.{key}", str(root_dir / cfg.Rec[key]))+ return cfg+@classmethoddef update_batch(cls, cfg: DictConfig, params: Dict[str, str]) -> DictConfig:for k, v in params.items():diff --git a/python/tests/test_main.py b/python/tests/test_main.pyindex c5b0e12..ff44997 100644--- a/python/tests/test_main.py+++ b/python/tests/test_main.py@@ -4,7 +4,7 @@import loggingimport sysfrom pathlib import Path-from typing import List+from typing import Any, Dict, List, Optionalimport cv2import numpy as np@@ -16,15 +16,29 @@ sys.path.append(str(root_dir))from rapidocr import LoadImageError, RapidOCRfrom rapidocr.inference_engine.base import InferSession-engine = RapidOCR()tests_dir = root_dir / "tests" / "test_files"img_path = tests_dir / "ch_en_num.jpg"-# def test_engine_openvino():-# engine = RapidOCR(params={"Global.with_openvino": True})-# result = engine(img_path)-# assert result.txts[0] == "ζ£εδΏι"+def engine():+ engine = RapidOCR()+ return engine+++def get_engine(params: Optional[Dict[str, Any]] = None):+ if params:+ engine = RapidOCR(params=params)+ return engine++ engine = RapidOCR()+ return engine+++def test_engine_openvino():+ engine = get_engine(params={"Global.with_openvino": True})+ result = engine(img_path)+ assert result.txts[0] == "ζ£εδΏι"# def test_engine_paddle():@@ -39,7 +53,7 @@ img_path = tests_dir / "ch_en_num.jpg"# assert result.txts[0] == "ζ£εδΏι"-def test_long_img():+def test_long_img(engine):img_url = "https://github.com/RapidAI/RapidOCR/releases/download/v1.1.0/long.jpeg"img_path = tests_dir / "long.jpeg"InferSession.download_file(img_url, save_path=img_path)@@ -56,7 +70,6 @@ def test_ort_cuda_warning(caplog):params={"Global.with_onnx": True, "EngineConfig.onnxruntime.use_cuda": True})caplog.set_level(logging.WARNING)-assert caplog.records[0].levelname == "WARNING"assert "CUDAExecutionProvider" in caplog.records[0].message@@ -71,7 +84,7 @@ def test_ort_dml_warning(caplog):assert "DirectML" in caplog.records[0].message-def test_mode_one_img():+def test_mode_one_img(engine):img_path = tests_dir / "issue_170.png"result = engine(img_path)assert result.txts[0] == "TEST"