Download apps/client/utils/ocr_provider.py from jun2024/fc: direct link, hf CLI and curl.
- Browser
- Download file 383 Bytes
-
https://huggingface.co/spaces/jun2024/fc/resolve/main/apps/client/utils/ocr_provider.py
- Command line
-
hf download hf://spaces/jun2024/fc/apps/client/utils/ocr_provider.py
-
curl -L -o ocr_provider.py https://huggingface.co/spaces/jun2024/fc/resolve/main/apps/client/utils/ocr_provider.py
383 Bytes
| """OCR 引擎提供者 - 隔离 client 模块对 automation 的导入.""" | |
| from typing import Any | |
| def get_ocr_engine(use_v5: bool = True) -> Any: | |
| """获取 OCR 引擎实例. | |
| Args: | |
| use_v5: 是否使用 PP-OCRv5 版本 | |
| Returns: | |
| OCR 引擎实例 | |
| """ | |
| from apps.automation.services.ocr import get_ocr_engine as _get | |
| return _get(use_v5=use_v5) | |