docling 2.24.0__py3-none-any.whl → 2.25.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,534 @@
1
+ import itertools
2
+ import logging
3
+ import re
4
+ import warnings
5
+ from io import BytesIO
6
+
7
+ # from io import BytesIO
8
+ from pathlib import Path
9
+ from typing import Optional
10
+
11
+ from docling_core.types import DoclingDocument
12
+ from docling_core.types.doc import (
13
+ BoundingBox,
14
+ DocItem,
15
+ DocItemLabel,
16
+ DoclingDocument,
17
+ GroupLabel,
18
+ ImageRef,
19
+ ImageRefMode,
20
+ PictureItem,
21
+ ProvenanceItem,
22
+ Size,
23
+ TableCell,
24
+ TableData,
25
+ TableItem,
26
+ )
27
+ from docling_core.types.doc.tokens import DocumentToken, TableToken
28
+
29
+ from docling.backend.abstract_backend import AbstractDocumentBackend
30
+ from docling.backend.md_backend import MarkdownDocumentBackend
31
+ from docling.backend.pdf_backend import PdfDocumentBackend
32
+ from docling.datamodel.base_models import InputFormat, Page
33
+ from docling.datamodel.document import ConversionResult, InputDocument
34
+ from docling.datamodel.pipeline_options import (
35
+ PdfPipelineOptions,
36
+ ResponseFormat,
37
+ VlmPipelineOptions,
38
+ )
39
+ from docling.datamodel.settings import settings
40
+ from docling.models.hf_vlm_model import HuggingFaceVlmModel
41
+ from docling.pipeline.base_pipeline import PaginatedPipeline
42
+ from docling.utils.profiling import ProfilingScope, TimeRecorder
43
+
44
+ _log = logging.getLogger(__name__)
45
+
46
+
47
+ class VlmPipeline(PaginatedPipeline):
48
+
49
+ def __init__(self, pipeline_options: VlmPipelineOptions):
50
+ super().__init__(pipeline_options)
51
+ self.keep_backend = True
52
+
53
+ warnings.warn(
54
+ "The VlmPipeline is currently experimental and may change in upcoming versions without notice.",
55
+ category=UserWarning,
56
+ stacklevel=2,
57
+ )
58
+
59
+ self.pipeline_options: VlmPipelineOptions
60
+
61
+ artifacts_path: Optional[Path] = None
62
+ if pipeline_options.artifacts_path is not None:
63
+ artifacts_path = Path(pipeline_options.artifacts_path).expanduser()
64
+ elif settings.artifacts_path is not None:
65
+ artifacts_path = Path(settings.artifacts_path).expanduser()
66
+
67
+ if artifacts_path is not None and not artifacts_path.is_dir():
68
+ raise RuntimeError(
69
+ f"The value of {artifacts_path=} is not valid. "
70
+ "When defined, it must point to a folder containing all models required by the pipeline."
71
+ )
72
+
73
+ # force_backend_text = False - use text that is coming from VLM response
74
+ # force_backend_text = True - get text from backend using bounding boxes predicted by SmolDocling doctags
75
+ self.force_backend_text = (
76
+ pipeline_options.force_backend_text
77
+ and pipeline_options.vlm_options.response_format == ResponseFormat.DOCTAGS
78
+ )
79
+
80
+ self.keep_images = self.pipeline_options.generate_page_images
81
+
82
+ self.build_pipe = [
83
+ HuggingFaceVlmModel(
84
+ enabled=True, # must be always enabled for this pipeline to make sense.
85
+ artifacts_path=artifacts_path,
86
+ accelerator_options=pipeline_options.accelerator_options,
87
+ vlm_options=self.pipeline_options.vlm_options,
88
+ ),
89
+ ]
90
+
91
+ self.enrichment_pipe = [
92
+ # Other models working on `NodeItem` elements in the DoclingDocument
93
+ ]
94
+
95
+ def initialize_page(self, conv_res: ConversionResult, page: Page) -> Page:
96
+ with TimeRecorder(conv_res, "page_init"):
97
+ page._backend = conv_res.input._backend.load_page(page.page_no) # type: ignore
98
+ if page._backend is not None and page._backend.is_valid():
99
+ page.size = page._backend.get_size()
100
+
101
+ return page
102
+
103
+ def _assemble_document(self, conv_res: ConversionResult) -> ConversionResult:
104
+ with TimeRecorder(conv_res, "doc_assemble", scope=ProfilingScope.DOCUMENT):
105
+
106
+ if (
107
+ self.pipeline_options.vlm_options.response_format
108
+ == ResponseFormat.DOCTAGS
109
+ ):
110
+ conv_res.document = self._turn_tags_into_doc(conv_res.pages)
111
+ elif (
112
+ self.pipeline_options.vlm_options.response_format
113
+ == ResponseFormat.MARKDOWN
114
+ ):
115
+ conv_res.document = self._turn_md_into_doc(conv_res)
116
+
117
+ else:
118
+ raise RuntimeError(
119
+ f"Unsupported VLM response format {self.pipeline_options.vlm_options.response_format}"
120
+ )
121
+
122
+ # Generate images of the requested element types
123
+ if self.pipeline_options.generate_picture_images:
124
+ scale = self.pipeline_options.images_scale
125
+ for element, _level in conv_res.document.iterate_items():
126
+ if not isinstance(element, DocItem) or len(element.prov) == 0:
127
+ continue
128
+ if (
129
+ isinstance(element, PictureItem)
130
+ and self.pipeline_options.generate_picture_images
131
+ ):
132
+ page_ix = element.prov[0].page_no - 1
133
+ page = conv_res.pages[page_ix]
134
+ assert page.size is not None
135
+ assert page.image is not None
136
+
137
+ crop_bbox = (
138
+ element.prov[0]
139
+ .bbox.scaled(scale=scale)
140
+ .to_top_left_origin(page_height=page.size.height * scale)
141
+ )
142
+
143
+ cropped_im = page.image.crop(crop_bbox.as_tuple())
144
+ element.image = ImageRef.from_pil(
145
+ cropped_im, dpi=int(72 * scale)
146
+ )
147
+
148
+ return conv_res
149
+
150
+ def _turn_md_into_doc(self, conv_res):
151
+ predicted_text = ""
152
+ for pg_idx, page in enumerate(conv_res.pages):
153
+ if page.predictions.vlm_response:
154
+ predicted_text += page.predictions.vlm_response.text + "\n\n"
155
+ response_bytes = BytesIO(predicted_text.encode("utf8"))
156
+ out_doc = InputDocument(
157
+ path_or_stream=response_bytes,
158
+ filename=conv_res.input.file.name,
159
+ format=InputFormat.MD,
160
+ backend=MarkdownDocumentBackend,
161
+ )
162
+ backend = MarkdownDocumentBackend(
163
+ in_doc=out_doc,
164
+ path_or_stream=response_bytes,
165
+ )
166
+ return backend.convert()
167
+
168
+ def _turn_tags_into_doc(self, pages: list[Page]) -> DoclingDocument:
169
+ ###############################################
170
+ # Tag definitions and color mappings
171
+ ###############################################
172
+
173
+ # Maps the recognized tag to a Docling label.
174
+ # Code items will be given DocItemLabel.CODE
175
+ tag_to_doclabel = {
176
+ "title": DocItemLabel.TITLE,
177
+ "document_index": DocItemLabel.DOCUMENT_INDEX,
178
+ "otsl": DocItemLabel.TABLE,
179
+ "section_header_level_1": DocItemLabel.SECTION_HEADER,
180
+ "checkbox_selected": DocItemLabel.CHECKBOX_SELECTED,
181
+ "checkbox_unselected": DocItemLabel.CHECKBOX_UNSELECTED,
182
+ "text": DocItemLabel.TEXT,
183
+ "page_header": DocItemLabel.PAGE_HEADER,
184
+ "page_footer": DocItemLabel.PAGE_FOOTER,
185
+ "formula": DocItemLabel.FORMULA,
186
+ "caption": DocItemLabel.CAPTION,
187
+ "picture": DocItemLabel.PICTURE,
188
+ "list_item": DocItemLabel.LIST_ITEM,
189
+ "footnote": DocItemLabel.FOOTNOTE,
190
+ "code": DocItemLabel.CODE,
191
+ }
192
+
193
+ # Maps each tag to an associated bounding box color.
194
+ tag_to_color = {
195
+ "title": "blue",
196
+ "document_index": "darkblue",
197
+ "otsl": "green",
198
+ "section_header_level_1": "purple",
199
+ "checkbox_selected": "black",
200
+ "checkbox_unselected": "gray",
201
+ "text": "red",
202
+ "page_header": "orange",
203
+ "page_footer": "cyan",
204
+ "formula": "pink",
205
+ "caption": "magenta",
206
+ "picture": "yellow",
207
+ "list_item": "brown",
208
+ "footnote": "darkred",
209
+ "code": "lightblue",
210
+ }
211
+
212
+ def extract_bounding_box(text_chunk: str) -> Optional[BoundingBox]:
213
+ """Extracts <loc_...> bounding box coords from the chunk, normalized by / 500."""
214
+ coords = re.findall(r"<loc_(\d+)>", text_chunk)
215
+ if len(coords) == 4:
216
+ l, t, r, b = map(float, coords)
217
+ return BoundingBox(l=l / 500, t=t / 500, r=r / 500, b=b / 500)
218
+ return None
219
+
220
+ def extract_inner_text(text_chunk: str) -> str:
221
+ """Strips all <...> tags inside the chunk to get the raw text content."""
222
+ return re.sub(r"<.*?>", "", text_chunk, flags=re.DOTALL).strip()
223
+
224
+ def extract_text_from_backend(page: Page, bbox: BoundingBox | None) -> str:
225
+ # Convert bounding box normalized to 0-100 into page coordinates for cropping
226
+ text = ""
227
+ if bbox:
228
+ if page.size:
229
+ bbox.l = bbox.l * page.size.width
230
+ bbox.t = bbox.t * page.size.height
231
+ bbox.r = bbox.r * page.size.width
232
+ bbox.b = bbox.b * page.size.height
233
+ if page._backend:
234
+ text = page._backend.get_text_in_rect(bbox)
235
+ return text
236
+
237
+ def otsl_parse_texts(texts, tokens):
238
+ split_word = TableToken.OTSL_NL.value
239
+ split_row_tokens = [
240
+ list(y)
241
+ for x, y in itertools.groupby(tokens, lambda z: z == split_word)
242
+ if not x
243
+ ]
244
+ table_cells = []
245
+ r_idx = 0
246
+ c_idx = 0
247
+
248
+ def count_right(tokens, c_idx, r_idx, which_tokens):
249
+ span = 0
250
+ c_idx_iter = c_idx
251
+ while tokens[r_idx][c_idx_iter] in which_tokens:
252
+ c_idx_iter += 1
253
+ span += 1
254
+ if c_idx_iter >= len(tokens[r_idx]):
255
+ return span
256
+ return span
257
+
258
+ def count_down(tokens, c_idx, r_idx, which_tokens):
259
+ span = 0
260
+ r_idx_iter = r_idx
261
+ while tokens[r_idx_iter][c_idx] in which_tokens:
262
+ r_idx_iter += 1
263
+ span += 1
264
+ if r_idx_iter >= len(tokens):
265
+ return span
266
+ return span
267
+
268
+ for i, text in enumerate(texts):
269
+ cell_text = ""
270
+ if text in [
271
+ TableToken.OTSL_FCEL.value,
272
+ TableToken.OTSL_ECEL.value,
273
+ TableToken.OTSL_CHED.value,
274
+ TableToken.OTSL_RHED.value,
275
+ TableToken.OTSL_SROW.value,
276
+ ]:
277
+ row_span = 1
278
+ col_span = 1
279
+ right_offset = 1
280
+ if text != TableToken.OTSL_ECEL.value:
281
+ cell_text = texts[i + 1]
282
+ right_offset = 2
283
+
284
+ # Check next element(s) for lcel / ucel / xcel, set properly row_span, col_span
285
+ next_right_cell = ""
286
+ if i + right_offset < len(texts):
287
+ next_right_cell = texts[i + right_offset]
288
+
289
+ next_bottom_cell = ""
290
+ if r_idx + 1 < len(split_row_tokens):
291
+ if c_idx < len(split_row_tokens[r_idx + 1]):
292
+ next_bottom_cell = split_row_tokens[r_idx + 1][c_idx]
293
+
294
+ if next_right_cell in [
295
+ TableToken.OTSL_LCEL.value,
296
+ TableToken.OTSL_XCEL.value,
297
+ ]:
298
+ # we have horisontal spanning cell or 2d spanning cell
299
+ col_span += count_right(
300
+ split_row_tokens,
301
+ c_idx + 1,
302
+ r_idx,
303
+ [TableToken.OTSL_LCEL.value, TableToken.OTSL_XCEL.value],
304
+ )
305
+ if next_bottom_cell in [
306
+ TableToken.OTSL_UCEL.value,
307
+ TableToken.OTSL_XCEL.value,
308
+ ]:
309
+ # we have a vertical spanning cell or 2d spanning cell
310
+ row_span += count_down(
311
+ split_row_tokens,
312
+ c_idx,
313
+ r_idx + 1,
314
+ [TableToken.OTSL_UCEL.value, TableToken.OTSL_XCEL.value],
315
+ )
316
+
317
+ table_cells.append(
318
+ TableCell(
319
+ text=cell_text.strip(),
320
+ row_span=row_span,
321
+ col_span=col_span,
322
+ start_row_offset_idx=r_idx,
323
+ end_row_offset_idx=r_idx + row_span,
324
+ start_col_offset_idx=c_idx,
325
+ end_col_offset_idx=c_idx + col_span,
326
+ )
327
+ )
328
+ if text in [
329
+ TableToken.OTSL_FCEL.value,
330
+ TableToken.OTSL_ECEL.value,
331
+ TableToken.OTSL_CHED.value,
332
+ TableToken.OTSL_RHED.value,
333
+ TableToken.OTSL_SROW.value,
334
+ TableToken.OTSL_LCEL.value,
335
+ TableToken.OTSL_UCEL.value,
336
+ TableToken.OTSL_XCEL.value,
337
+ ]:
338
+ c_idx += 1
339
+ if text == TableToken.OTSL_NL.value:
340
+ r_idx += 1
341
+ c_idx = 0
342
+ return table_cells, split_row_tokens
343
+
344
+ def otsl_extract_tokens_and_text(s: str):
345
+ # Pattern to match anything enclosed by < > (including the angle brackets themselves)
346
+ pattern = r"(<[^>]+>)"
347
+ # Find all tokens (e.g. "<otsl>", "<loc_140>", etc.)
348
+ tokens = re.findall(pattern, s)
349
+ # Remove any tokens that start with "<loc_"
350
+ tokens = [
351
+ token
352
+ for token in tokens
353
+ if not (
354
+ token.startswith(rf"<{DocumentToken.LOC.value}")
355
+ or token
356
+ in [
357
+ rf"<{DocumentToken.OTSL.value}>",
358
+ rf"</{DocumentToken.OTSL.value}>",
359
+ ]
360
+ )
361
+ ]
362
+ # Split the string by those tokens to get the in-between text
363
+ text_parts = re.split(pattern, s)
364
+ text_parts = [
365
+ token
366
+ for token in text_parts
367
+ if not (
368
+ token.startswith(rf"<{DocumentToken.LOC.value}")
369
+ or token
370
+ in [
371
+ rf"<{DocumentToken.OTSL.value}>",
372
+ rf"</{DocumentToken.OTSL.value}>",
373
+ ]
374
+ )
375
+ ]
376
+ # Remove any empty or purely whitespace strings from text_parts
377
+ text_parts = [part for part in text_parts if part.strip()]
378
+
379
+ return tokens, text_parts
380
+
381
+ def parse_table_content(otsl_content: str) -> TableData:
382
+ tokens, mixed_texts = otsl_extract_tokens_and_text(otsl_content)
383
+ table_cells, split_row_tokens = otsl_parse_texts(mixed_texts, tokens)
384
+
385
+ return TableData(
386
+ num_rows=len(split_row_tokens),
387
+ num_cols=(
388
+ max(len(row) for row in split_row_tokens) if split_row_tokens else 0
389
+ ),
390
+ table_cells=table_cells,
391
+ )
392
+
393
+ doc = DoclingDocument(name="Document")
394
+ for pg_idx, page in enumerate(pages):
395
+ xml_content = ""
396
+ predicted_text = ""
397
+ if page.predictions.vlm_response:
398
+ predicted_text = page.predictions.vlm_response.text
399
+ image = page.image
400
+
401
+ page_no = pg_idx + 1
402
+ bounding_boxes = []
403
+
404
+ if page.size:
405
+ pg_width = page.size.width
406
+ pg_height = page.size.height
407
+ size = Size(width=pg_width, height=pg_height)
408
+ parent_page = doc.add_page(page_no=page_no, size=size)
409
+
410
+ """
411
+ 1. Finds all <tag>...</tag> blocks in the entire string (multi-line friendly) in the order they appear.
412
+ 2. For each chunk, extracts bounding box (if any) and inner text.
413
+ 3. Adds the item to a DoclingDocument structure with the right label.
414
+ 4. Tracks bounding boxes + color in a separate list for later visualization.
415
+ """
416
+
417
+ # Regex for all recognized tags
418
+ tag_pattern = (
419
+ rf"<(?P<tag>{DocItemLabel.TITLE}|{DocItemLabel.DOCUMENT_INDEX}|"
420
+ rf"{DocItemLabel.CHECKBOX_UNSELECTED}|{DocItemLabel.CHECKBOX_SELECTED}|"
421
+ rf"{DocItemLabel.TEXT}|{DocItemLabel.PAGE_HEADER}|"
422
+ rf"{DocItemLabel.PAGE_FOOTER}|{DocItemLabel.FORMULA}|"
423
+ rf"{DocItemLabel.CAPTION}|{DocItemLabel.PICTURE}|"
424
+ rf"{DocItemLabel.LIST_ITEM}|{DocItemLabel.FOOTNOTE}|{DocItemLabel.CODE}|"
425
+ rf"{DocItemLabel.SECTION_HEADER}_level_1|{DocumentToken.OTSL.value})>.*?</(?P=tag)>"
426
+ )
427
+
428
+ # DocumentToken.OTSL
429
+ pattern = re.compile(tag_pattern, re.DOTALL)
430
+
431
+ # Go through each match in order
432
+ for match in pattern.finditer(predicted_text):
433
+ full_chunk = match.group(0)
434
+ tag_name = match.group("tag")
435
+
436
+ bbox = extract_bounding_box(full_chunk)
437
+ doc_label = tag_to_doclabel.get(tag_name, DocItemLabel.PARAGRAPH)
438
+ color = tag_to_color.get(tag_name, "white")
439
+
440
+ # Store bounding box + color
441
+ if bbox:
442
+ bounding_boxes.append((bbox, color))
443
+
444
+ if tag_name == DocumentToken.OTSL.value:
445
+ table_data = parse_table_content(full_chunk)
446
+ bbox = extract_bounding_box(full_chunk)
447
+
448
+ if bbox:
449
+ prov = ProvenanceItem(
450
+ bbox=bbox.resize_by_scale(pg_width, pg_height),
451
+ charspan=(0, 0),
452
+ page_no=page_no,
453
+ )
454
+ doc.add_table(data=table_data, prov=prov)
455
+ else:
456
+ doc.add_table(data=table_data)
457
+
458
+ elif tag_name == DocItemLabel.PICTURE:
459
+ text_caption_content = extract_inner_text(full_chunk)
460
+ if image:
461
+ if bbox:
462
+ im_width, im_height = image.size
463
+
464
+ crop_box = (
465
+ int(bbox.l * im_width),
466
+ int(bbox.t * im_height),
467
+ int(bbox.r * im_width),
468
+ int(bbox.b * im_height),
469
+ )
470
+ cropped_image = image.crop(crop_box)
471
+ pic = doc.add_picture(
472
+ parent=None,
473
+ image=ImageRef.from_pil(image=cropped_image, dpi=72),
474
+ prov=(
475
+ ProvenanceItem(
476
+ bbox=bbox.resize_by_scale(pg_width, pg_height),
477
+ charspan=(0, 0),
478
+ page_no=page_no,
479
+ )
480
+ ),
481
+ )
482
+ # If there is a caption to an image, add it as well
483
+ if len(text_caption_content) > 0:
484
+ caption_item = doc.add_text(
485
+ label=DocItemLabel.CAPTION,
486
+ text=text_caption_content,
487
+ parent=None,
488
+ )
489
+ pic.captions.append(caption_item.get_ref())
490
+ else:
491
+ if bbox:
492
+ # In case we don't have access to an binary of an image
493
+ doc.add_picture(
494
+ parent=None,
495
+ prov=ProvenanceItem(
496
+ bbox=bbox, charspan=(0, 0), page_no=page_no
497
+ ),
498
+ )
499
+ # If there is a caption to an image, add it as well
500
+ if len(text_caption_content) > 0:
501
+ caption_item = doc.add_text(
502
+ label=DocItemLabel.CAPTION,
503
+ text=text_caption_content,
504
+ parent=None,
505
+ )
506
+ pic.captions.append(caption_item.get_ref())
507
+ else:
508
+ # For everything else, treat as text
509
+ if self.force_backend_text:
510
+ text_content = extract_text_from_backend(page, bbox)
511
+ else:
512
+ text_content = extract_inner_text(full_chunk)
513
+ doc.add_text(
514
+ label=doc_label,
515
+ text=text_content,
516
+ prov=(
517
+ ProvenanceItem(
518
+ bbox=bbox.resize_by_scale(pg_width, pg_height),
519
+ charspan=(0, len(text_content)),
520
+ page_no=page_no,
521
+ )
522
+ if bbox
523
+ else None
524
+ ),
525
+ )
526
+ return doc
527
+
528
+ @classmethod
529
+ def get_default_options(cls) -> VlmPipelineOptions:
530
+ return VlmPipelineOptions()
531
+
532
+ @classmethod
533
+ def is_backend_supported(cls, backend: AbstractDocumentBackend):
534
+ return isinstance(backend, PdfDocumentBackend)
docling/utils/locks.py ADDED
@@ -0,0 +1,3 @@
1
+ import threading
2
+
3
+ pypdfium2_lock = threading.Lock()
@@ -2,7 +2,10 @@ import logging
2
2
  from pathlib import Path
3
3
  from typing import Optional
4
4
 
5
- from docling.datamodel.pipeline_options import smolvlm_picture_description
5
+ from docling.datamodel.pipeline_options import (
6
+ granite_picture_description,
7
+ smolvlm_picture_description,
8
+ )
6
9
  from docling.datamodel.settings import settings
7
10
  from docling.models.code_formula_model import CodeFormulaModel
8
11
  from docling.models.document_picture_classifier import DocumentPictureClassifier
@@ -23,7 +26,8 @@ def download_models(
23
26
  with_tableformer: bool = True,
24
27
  with_code_formula: bool = True,
25
28
  with_picture_classifier: bool = True,
26
- with_smolvlm: bool = True,
29
+ with_smolvlm: bool = False,
30
+ with_granite_vision: bool = False,
27
31
  with_easyocr: bool = True,
28
32
  ):
29
33
  if output_dir is None:
@@ -73,6 +77,15 @@ def download_models(
73
77
  progress=progress,
74
78
  )
75
79
 
80
+ if with_granite_vision:
81
+ _log.info(f"Downloading Granite Vision model...")
82
+ PictureDescriptionVlmModel.download_models(
83
+ repo_id=granite_picture_description.repo_id,
84
+ local_dir=output_dir / granite_picture_description.repo_cache_folder,
85
+ force=force,
86
+ progress=progress,
87
+ )
88
+
76
89
  if with_easyocr:
77
90
  _log.info(f"Downloading easyocr models...")
78
91
  EasyOcrModel.download_models(
@@ -43,6 +43,11 @@ def draw_clusters(
43
43
  y0 *= scale_x
44
44
  y1 *= scale_y
45
45
 
46
+ if y1 <= y0:
47
+ y1, y0 = y0, y1
48
+ if x1 <= x0:
49
+ x1, x0 = x0, x1
50
+
46
51
  cluster_fill_color = (*list(DocItemLabel.get_color(c.label)), 70)
47
52
  cluster_outline_color = (
48
53
  *list(DocItemLabel.get_color(c.label)),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: docling
3
- Version: 2.24.0
3
+ Version: 2.25.1
4
4
  Summary: SDK and CLI for parsing PDF, DOCX, HTML, and more, to a unified document representation for powering downstream workflows such as gen AI applications.
5
5
  Home-page: https://github.com/DS4SD/docling
6
6
  License: MIT
@@ -25,6 +25,7 @@ Provides-Extra: ocrmac
25
25
  Provides-Extra: rapidocr
26
26
  Provides-Extra: tesserocr
27
27
  Provides-Extra: vlm
28
+ Requires-Dist: accelerate (>=1.2.1,<2.0.0) ; (sys_platform != "darwin" or platform_machine != "x86_64") and (extra == "vlm")
28
29
  Requires-Dist: beautifulsoup4 (>=4.12.3,<5.0.0)
29
30
  Requires-Dist: certifi (>=2024.7.4)
30
31
  Requires-Dist: docling-core[chunking] (>=2.19.0,<3.0.0)