Closed adrianzhang closed 4 days ago
Where are getting these code? Those imports are not part of Docling.
TextPipelineOptions,
RtfPipelineOptions,
I would suggest looking at the examples we have in the docs: https://ds4sd.github.io/docling/examples/.
Bug
When running py script which depends on docling, it always tell me: {doc type}PipelineOptions can not be imported. These types are HTML Doc Text.... ...
Steps to reproduce
My code:
import os import sys from pathlib import Path
from docling.document_converter import DocumentConverter from docling.datamodel.pipeline_options import ( PdfPipelineOptions, TextPipelineOptions, RtfPipelineOptions, EasyOcrOptions ) from docling.datamodel.base_models import InputFormat
def process_document(input_file):
Create a DocumentConverter instance
def is_image_pdf(input_file):
Check if the input PDF is an image-based PDF
if name == "main": if len(sys.argv) != 2: print("Usage: python process_docs.py")
sys.exit(1)
...
Docling version
docling 2.5.2 docling-core 2.3.2 docling-ibm-models 2.0.3 docling-parse 2.0.4 ...
Python version
python --version Python 3.11.1 ...