summaryrefslogtreecommitdiff
path: root/text_recognizer
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-09-18 18:57:10 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-09-18 18:57:10 +0200
commitc4df0e0ae8f0980f509b09a7c2ba4014cceff2cc (patch)
treef1636d9307b9a669e732f2a0f48ceca3cf7979fa /text_recognizer
parent8eec5f3d4ce41c2ba30f0f1ab3f506fc3c0dd263 (diff)
Format
Diffstat (limited to 'text_recognizer')
-rw-r--r--text_recognizer/image_utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/text_recognizer/image_utils.py b/text_recognizer/image_utils.py
index 0faed79..fcb094c 100644
--- a/text_recognizer/image_utils.py
+++ b/text_recognizer/image_utils.py
@@ -4,8 +4,8 @@ from io import BytesIO
from pathlib import Path
from typing import Any, Union
-from PIL import Image
import smart_open
+from PIL import Image
def read_image_pil(image_uri: Union[Path, str], grayscale: bool = False) -> Image:
@@ -14,7 +14,7 @@ def read_image_pil(image_uri: Union[Path, str], grayscale: bool = False) -> Imag
return read_image_pil_file(image_file, grayscale)
-def read_image_pil_file(image_file: Any, grayscale: bool = False) -> Image:
+def read_image_pil_file(image_file: str, grayscale: bool = False) -> Image:
"""Return PIL image."""
with Image.open(image_file) as image:
if grayscale: