From dd74a659d3980cf8293538ee8941f0ce6f1bf7fa Mon Sep 17 00:00:00 2001 From: raxtemur Date: Thu, 26 Oct 2023 02:59:39 +0300 Subject: [PATCH] TLDR-462 -- calling ColumnsOrientationClassifier with gpu --- dedoc/readers/pdf_reader/pdf_image_reader/pdf_image_reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dedoc/readers/pdf_reader/pdf_image_reader/pdf_image_reader.py b/dedoc/readers/pdf_reader/pdf_image_reader/pdf_image_reader.py index 28ee7775..e0fea000 100644 --- a/dedoc/readers/pdf_reader/pdf_image_reader/pdf_image_reader.py +++ b/dedoc/readers/pdf_reader/pdf_image_reader/pdf_image_reader.py @@ -47,7 +47,7 @@ def __init__(self, *, config: dict) -> None: """ super().__init__(config=config) self.scew_corrector = SkewCorrector() - self.column_orientation_classifier = ColumnsOrientationClassifier(on_gpu=False, checkpoint_path=get_config()["resources_path"], config=config) + self.column_orientation_classifier = ColumnsOrientationClassifier(on_gpu=self.config.get("on_gpu", False), checkpoint_path=get_config()["resources_path"], config=config) self.binarizer = AdaptiveBinarizer() self.ocr = OCRLineExtractor(config=config) self.logger = config.get("logger", logging.getLogger())