How do I use the downloaded model?
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
What do you mean exactly? Models are used by the convert pipeline inside Docling.
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 If you want to use/download the models directly, I would refer you to the Huggingface page
@PeterStaar-IBM I don't think you understand the question, so you just reply seriously.
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
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 this looks like a new topic, do you mind opening a new feature request issue for this?
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