mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 20:58:11 +00:00
Skeleton for SmolDocling model and VLM Pipeline
Signed-off-by: Christoph Auer <cau@zurich.ibm.com> Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
This commit is contained in:
committed by
Maksym Lysak
parent
1d17e7397a
commit
dc3a388aa2
13
docs/examples/minimal_smol_docling.py
Normal file
13
docs/examples/minimal_smol_docling.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from docling.datamodel.base_models import InputFormat
|
||||
from docling.document_converter import DocumentConverter, PdfFormatOption
|
||||
from docling.pipeline.vlm_pipeline import VlmPipeline
|
||||
|
||||
source = "https://arxiv.org/pdf/2408.09869" # document per local path or URL
|
||||
converter = DocumentConverter(
|
||||
doc_converter=DocumentConverter(
|
||||
format_options={InputFormat.PDF: PdfFormatOption(pipeline_cls=VlmPipeline)}
|
||||
)
|
||||
)
|
||||
result = converter.convert(source)
|
||||
print(result.document.export_to_markdown())
|
||||
# output: ## Docling Technical Report [...]"
|
||||
Reference in New Issue
Block a user