Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
Michele Dolfi 2024-10-11 13:06:32 +02:00
parent 94b5e1532d
commit 753f67a434
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
from typing import Iterable from typing import Iterable, Optional
from PIL import ImageDraw from PIL import ImageDraw
from pydantic import BaseModel from pydantic import BaseModel
@ -8,7 +8,7 @@ from docling.models.abstract_model import AbstractPageModel
class PagePreprocessingOptions(BaseModel): class PagePreprocessingOptions(BaseModel):
images_scale: float images_scale: Optional[float]
class PagePreprocessingModel(AbstractPageModel): class PagePreprocessingModel(AbstractPageModel):

View File

@ -47,7 +47,7 @@ class StandardPdfModelPipeline(PaginatedModelPipeline):
) )
) )
if ocr_model := self.get_ocr_model() is None: if (ocr_model := self.get_ocr_model()) is None:
raise RuntimeError( raise RuntimeError(
f"The specified OCR kind is not supported: {pipeline_options.ocr_options.kind}." f"The specified OCR kind is not supported: {pipeline_options.ocr_options.kind}."
) )