Download modules/ocr/ocr_none.py from sayed555/manga1: direct link, hf CLI and curl.
- Browser
- Download file 518 Bytes
-
https://huggingface.co/spaces/sayed555/manga1/resolve/main/modules/ocr/ocr_none.py
- Command line
-
hf download hf://spaces/sayed555/manga1/modules/ocr/ocr_none.py
-
curl -L -o ocr_none.py https://huggingface.co/spaces/sayed555/manga1/resolve/main/modules/ocr/ocr_none.py
518 Bytes
| import numpy as np | |
| from .base import OCRBase, register_OCR, List, TextBlock | |
| class OCRNone(OCRBase): | |
| def __init__(self, **params) -> None: | |
| super().__init__(**params) | |
| params = { | |
| 'NOTICE': 'Not a OCR, just return original text.', | |
| 'description': 'Not a OCR, just return original text.' | |
| } | |
| def _ocr_blk_list(self, img: np.ndarray, blk_list: List[TextBlock], *args, **kwargs): | |
| pass | |
| def ocr_img(self, img: np.ndarray) -> str: | |
| return '' |