summaryrefslogtreecommitdiff
path: root/text_recognizer/data/utils
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-09-18 18:12:54 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-09-18 18:12:54 +0200
commit8eec5f3d4ce41c2ba30f0f1ab3f506fc3c0dd263 (patch)
tree19244a467e90ed8b919cdf2912d9e1b141ea1801 /text_recognizer/data/utils
parent2cc6aa059139b57057609817913ad515063c2eab (diff)
Formats
Diffstat (limited to 'text_recognizer/data/utils')
-rw-r--r--text_recognizer/data/utils/image_utils.py2
-rw-r--r--text_recognizer/data/utils/sentence_generator.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/text_recognizer/data/utils/image_utils.py b/text_recognizer/data/utils/image_utils.py
index d374fc3..3f4901c 100644
--- a/text_recognizer/data/utils/image_utils.py
+++ b/text_recognizer/data/utils/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:
diff --git a/text_recognizer/data/utils/sentence_generator.py b/text_recognizer/data/utils/sentence_generator.py
index 8567e6d..c98d0da 100644
--- a/text_recognizer/data/utils/sentence_generator.py
+++ b/text_recognizer/data/utils/sentence_generator.py
@@ -5,8 +5,8 @@ import string
from typing import Optional
import nltk
-from nltk.corpus.reader.util import ConcatenatedCorpusView
import numpy as np
+from nltk.corpus.reader.util import ConcatenatedCorpusView
from text_recognizer.data.base_data_module import BaseDataModule