mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-26 20:14:47 +00:00
Merge branch 'cau/docling-parse-api' of github.com:DS4SD/docling into cau/dpv4-test-updates
This commit is contained in:
commit
9359f86c6a
@ -8,6 +8,7 @@ from docling.backend.pypdfium2_backend import PyPdfiumDocumentBackend
|
|||||||
from docling.datamodel.base_models import DocumentStream, InputFormat
|
from docling.datamodel.base_models import DocumentStream, InputFormat
|
||||||
from docling.datamodel.document import InputDocument, _DocumentConversionInput
|
from docling.datamodel.document import InputDocument, _DocumentConversionInput
|
||||||
from docling.datamodel.settings import DocumentLimits
|
from docling.datamodel.settings import DocumentLimits
|
||||||
|
from docling.document_converter import PdfFormatOption
|
||||||
|
|
||||||
|
|
||||||
def test_in_doc_from_valid_path():
|
def test_in_doc_from_valid_path():
|
||||||
@ -227,7 +228,7 @@ def _make_input_doc(path):
|
|||||||
in_doc = InputDocument(
|
in_doc = InputDocument(
|
||||||
path_or_stream=path,
|
path_or_stream=path,
|
||||||
format=InputFormat.PDF,
|
format=InputFormat.PDF,
|
||||||
backend=DoclingParseV4DocumentBackend,
|
backend=PdfFormatOption().backend, # use default
|
||||||
)
|
)
|
||||||
return in_doc
|
return in_doc
|
||||||
|
|
||||||
@ -237,6 +238,6 @@ def _make_input_doc_from_stream(doc_stream):
|
|||||||
path_or_stream=doc_stream.stream,
|
path_or_stream=doc_stream.stream,
|
||||||
format=InputFormat.PDF,
|
format=InputFormat.PDF,
|
||||||
filename=doc_stream.name,
|
filename=doc_stream.name,
|
||||||
backend=DoclingParseV4DocumentBackend,
|
backend=PdfFormatOption().backend, # use default
|
||||||
)
|
)
|
||||||
return in_doc
|
return in_doc
|
||||||
|
Loading…
Reference in New Issue
Block a user