mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-27 04:24:45 +00:00
fixes
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
parent
94b5e1532d
commit
753f67a434
@ -1,4 +1,4 @@
|
||||
from typing import Iterable
|
||||
from typing import Iterable, Optional
|
||||
|
||||
from PIL import ImageDraw
|
||||
from pydantic import BaseModel
|
||||
@ -8,7 +8,7 @@ from docling.models.abstract_model import AbstractPageModel
|
||||
|
||||
|
||||
class PagePreprocessingOptions(BaseModel):
|
||||
images_scale: float
|
||||
images_scale: Optional[float]
|
||||
|
||||
|
||||
class PagePreprocessingModel(AbstractPageModel):
|
||||
|
@ -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(
|
||||
f"The specified OCR kind is not supported: {pipeline_options.ocr_options.kind}."
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user