mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-26 20:14:47 +00:00
fixing the tests
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
This commit is contained in:
parent
0c7c7c11c2
commit
e93cc3ce09
@ -154,3 +154,22 @@ qwen25_vl_3b_vlm_mlx_conversion_options = HuggingFaceVlmOptions(
|
||||
scale=2.0,
|
||||
temperature=0.0,
|
||||
)
|
||||
|
||||
# Gemma-3
|
||||
gemma_3_12b_mlx_conversion_options = HuggingFaceVlmOptions(
|
||||
repo_id="mlx-community/gemma-3-12b-it-bf16",
|
||||
prompt="Convert this page to markdown. Do not miss any text and only output the bare MarkDown!",
|
||||
response_format=ResponseFormat.MARKDOWN,
|
||||
inference_framework=InferenceFramework.MLX,
|
||||
scale=2.0,
|
||||
temperature=0.0,
|
||||
)
|
||||
|
||||
gemma_3_27b_mlx_conversion_options = HuggingFaceVlmOptions(
|
||||
repo_id="mlx-community/gemma-3-27b-it-bf16",
|
||||
prompt="Convert this page to markdown. Do not miss any text and only output the bare MarkDown!",
|
||||
response_format=ResponseFormat.MARKDOWN,
|
||||
inference_framework=InferenceFramework.MLX,
|
||||
scale=2.0,
|
||||
temperature=0.0,
|
||||
)
|
||||
|
@ -11,6 +11,7 @@ from docling.datamodel.pipeline_model_specializations import (
|
||||
HuggingFaceVlmOptions,
|
||||
InferenceFramework,
|
||||
ResponseFormat,
|
||||
gemma_3_12b_mlx_conversion_options,
|
||||
granite_vision_vlm_conversion_options,
|
||||
granite_vision_vlm_ollama_conversion_options,
|
||||
phi_vlm_conversion_options,
|
||||
@ -199,6 +200,7 @@ if __name__ == "__main__":
|
||||
# qwen25_vl_3b_vlm_mlx_conversion_options, \
|
||||
# pixtral_12b_vlm_mlx_conversion_options,
|
||||
# pixtral_12b_vlm_conversion_options,
|
||||
gemma_3_12b_mlx_conversion_options,
|
||||
]:
|
||||
pipeline_options.vlm_options = vlm_options
|
||||
|
||||
|
@ -2,6 +2,7 @@ from io import BytesIO
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from docling_core.types.doc.document import SectionHeaderItem
|
||||
|
||||
from docling.backend.html_backend import HTMLDocumentBackend
|
||||
from docling.datamodel.base_models import InputFormat
|
||||
@ -9,7 +10,7 @@ from docling.datamodel.document import (
|
||||
ConversionResult,
|
||||
DoclingDocument,
|
||||
InputDocument,
|
||||
SectionHeaderItem,
|
||||
# SectionHeaderItem,
|
||||
)
|
||||
from docling.document_converter import DocumentConverter
|
||||
|
||||
|
@ -1,12 +1,14 @@
|
||||
from pathlib import Path
|
||||
|
||||
from docling_core.types.doc.document import SectionHeaderItem
|
||||
|
||||
from docling.backend.msword_backend import MsWordDocumentBackend
|
||||
from docling.datamodel.base_models import InputFormat
|
||||
from docling.datamodel.document import (
|
||||
ConversionResult,
|
||||
DoclingDocument,
|
||||
InputDocument,
|
||||
SectionHeaderItem,
|
||||
# SectionHeaderItem,
|
||||
)
|
||||
from docling.document_converter import DocumentConverter
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user