docling icon indicating copy to clipboard operation
docling copied to clipboard

How do I use the downloaded model?

Open Zhengyu-Ju opened this issue 1 year ago • 2 comments

Question

... question: How do I use the downloaded model? Code: source = "https://arxiv.org/pdf/2408.09869" # document per local path or URL converter = DocumentConverter() result = converter.convert(source) downloaded models image

Zhengyu-Ju avatar Nov 14 '24 09:11 Zhengyu-Ju

What do you mean exactly? Models are used by the convert pipeline inside Docling.

dolfim-ibm avatar Nov 14 '24 12:11 dolfim-ibm

bug:(MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/ds4sd/docling-models/revision/v2.0.1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f7728256320>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"), '(Request ID: f7ff0951-b939-4902-bb59-0ef04176f1c2)') code source = "/home/ubuntu/xxxxxx" converter = DocumentConverter() result = converter.convert(source) question when i run the code,i found the question, i want use downloaded models and use model by set model path,instaed of downloading models online

Zhengyu-Ju avatar Nov 15 '24 09:11 Zhengyu-Ju

@Zhengyu-Ju If you want to use/download the models directly, I would refer you to the Huggingface page

PeterStaar-IBM avatar Nov 16 '24 07:11 PeterStaar-IBM

@PeterStaar-IBM I don't think you understand the question, so you just reply seriously.

Runningwater2357 avatar Nov 16 '24 08:11 Runningwater2357

If you want to use a local path where you have prefetched your models, that's documented here: https://ds4sd.github.io/docling/usage/#provide-specific-artifacts-path

vagenas avatar Nov 16 '24 12:11 vagenas

question: do we have a function to generate a floder which contains images floder and markdown file Code: doc_converter = DocumentConverter( format_options={ InputFormat.PDF: PdfFormatOption( pipeline_options=pipeline_options, backend=PyPdfiumDocumentBackend ) } ) result = doc_converter.convert(source, max_num_pages=2, max_file_size=20971520) result.document.export_to_markdown() note: i means do we have the function like export_to_markdown()

Zhengyu-Ju avatar Nov 20 '24 03:11 Zhengyu-Ju

@Zhengyu-Ju this looks like a new topic, do you mind opening a new feature request issue for this?

dolfim-ibm avatar Nov 20 '24 06:11 dolfim-ibm

If you want to use a local path where you have prefetched your models, that's documented here: https://ds4sd.github.io/docling/usage/#provide-specific-artifacts-path

Since that url is no longer available, for future visitors I'll add the correct one: https://docling-project.github.io/docling/usage/#model-prefetching-and-offline-usage

Sekiraw avatar Mar 26 '25 09:03 Sekiraw