mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-31 14:34:40 +00:00
add check if artifacts_path exists and is dir
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
parent
686b3a0616
commit
8acd9aae4a
@ -64,6 +64,12 @@ class StandardPdfPipeline(PaginatedPipeline):
|
||||
elif settings.artifacts_path is not None:
|
||||
artifacts_path = Path(settings.artifacts_path).expanduser()
|
||||
|
||||
if artifacts_path is not None and not artifacts_path.is_dir():
|
||||
raise RuntimeError(
|
||||
f"The value of {artifacts_path=} is not valid. "
|
||||
"When defined, it must point to a folder containing all models required by the pipeline."
|
||||
)
|
||||
|
||||
self.keep_images = (
|
||||
self.pipeline_options.generate_page_images
|
||||
or self.pipeline_options.generate_picture_images
|
||||
|
Loading…
Reference in New Issue
Block a user