Skip to content

Commit 2d9994c

Browse files
committed
fix import
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
1 parent 457e248 commit 2d9994c

1 file changed

Lines changed: 3 additions & 17 deletions

File tree

docling_eval/cli/main.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,9 @@
136136
from docling_eval.prediction_providers.google_prediction_provider import (
137137
GoogleDocAIPredictionProvider,
138138
)
139-
140-
# TableFormer is optional - it requires docling with table_structure_model support
141-
try:
142-
from docling_eval.prediction_providers.tableformer_provider import (
143-
TableFormerPredictionProvider,
144-
)
145-
146-
TABLEFORMER_AVAILABLE = True
147-
except ImportError:
148-
TABLEFORMER_AVAILABLE = False
149-
TableFormerPredictionProvider = None # type: ignore
150-
139+
from docling_eval.prediction_providers.tableformer_provider import (
140+
TableFormerPredictionProvider,
141+
)
151142
from docling_eval.utils.external_docling_document_loader import (
152143
ExternalDoclingDocumentLoader,
153144
)
@@ -629,11 +620,6 @@ def get_prediction_provider(
629620
ignore_missing_predictions=True,
630621
)
631622
elif provider_type == PredictionProviderType.TABLEFORMER:
632-
if not TABLEFORMER_AVAILABLE:
633-
raise RuntimeError(
634-
"TableFormer prediction provider is not available. "
635-
"Please ensure docling is installed with table_structure_model support."
636-
)
637623
return TableFormerPredictionProvider(
638624
do_visualization=do_visualization,
639625
ignore_missing_predictions=True,

0 commit comments

Comments
 (0)