mirror of
https://github.com/DS4SD/docling.git
synced 2025-08-02 15:32:30 +00:00
update docs
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
parent
f0a6932e40
commit
8d810fd45f
@ -35,14 +35,10 @@ from docling.datamodel.base_models import InputFormat
|
|||||||
from docling.datamodel.pipeline_options import EasyOcrOptions, PdfPipelineOptions
|
from docling.datamodel.pipeline_options import EasyOcrOptions, PdfPipelineOptions
|
||||||
from docling.document_converter import DocumentConverter, PdfFormatOption
|
from docling.document_converter import DocumentConverter, PdfFormatOption
|
||||||
|
|
||||||
|
# dowload all models with `docling-tools models download`
|
||||||
artifacts_path = "/local/path/to/artifacts"
|
artifacts_path = "/local/path/to/artifacts"
|
||||||
|
|
||||||
pipeline_options = PdfPipelineOptions(artifacts_path=artifacts_path)
|
pipeline_options = PdfPipelineOptions(artifacts_path=artifacts_path)
|
||||||
# if you are using EasyOcr
|
|
||||||
pipeline_options.ocr_options = EasyOcrOptions(
|
|
||||||
download_enabled=False,
|
|
||||||
model_storage_directory=str(artifacts_path / "EasyOcr")
|
|
||||||
)
|
|
||||||
doc_converter = DocumentConverter(
|
doc_converter = DocumentConverter(
|
||||||
format_options={
|
format_options={
|
||||||
InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)
|
InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)
|
||||||
@ -62,6 +58,9 @@ Downloading easyocr models...
|
|||||||
All models downloaded in the directory $HOME/.cache/docling/models.
|
All models downloaded in the directory $HOME/.cache/docling/models.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Alternatively, the download of all models can be triggered also with `docling.utils.models_downloader.download_all()`.
|
||||||
|
|
||||||
|
|
||||||
#### Adjust pipeline features
|
#### Adjust pipeline features
|
||||||
|
|
||||||
The example file [custom_convert.py](./examples/custom_convert.py) contains multiple ways
|
The example file [custom_convert.py](./examples/custom_convert.py) contains multiple ways
|
||||||
|
Loading…
Reference in New Issue
Block a user