Skip to content

Commit c6ae148

Browse files
committed
add example for cpu-only
Signed-off-by: Michele Dolfi <[email protected]>
1 parent 5f07114 commit c6ae148

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/examples/custom_convert.py

+14
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,20 @@ def main():
8080
}
8181
)
8282

83+
# Docling Parse with EasyOCR (CPU only)
84+
# ----------------------
85+
pipeline_options = PdfPipelineOptions()
86+
pipeline_options.do_ocr = True
87+
pipeline_options.ocr_options.use_gpu = False
88+
pipeline_options.do_table_structure = True
89+
pipeline_options.table_structure_options.do_cell_matching = True
90+
91+
doc_converter = DocumentConverter(
92+
format_options={
93+
InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)
94+
}
95+
)
96+
8397
# Docling Parse with Tesseract
8498
# ----------------------
8599
# pipeline_options = PdfPipelineOptions()

0 commit comments

Comments
 (0)