@@ -295,7 +295,7 @@ def pipeline_api(
295
295
hi_res_model_name : Optional [str ] = None ,
296
296
include_page_breaks : bool = False ,
297
297
ocr_languages : Optional [List [str ]] = None ,
298
- pdf_infer_table_structure : bool = True ,
298
+ pdf_infer_table_structure : bool = False ,
299
299
skip_infer_table_types : Optional [List [str ]] = None ,
300
300
strategy : str = "auto" ,
301
301
xml_keep_tags : bool = False ,
@@ -361,7 +361,6 @@ def pipeline_api(
361
361
362
362
hi_res_model_name = _validate_hi_res_model_name (hi_res_model_name , coordinates )
363
363
strategy = _validate_strategy (strategy )
364
- pdf_infer_table_structure = _set_pdf_infer_table_structure (pdf_infer_table_structure , strategy )
365
364
366
365
# Parallel mode is set by env variable
367
366
enable_parallel_mode = os .environ .get ("UNSTRUCTURED_PARALLEL_MODE_ENABLED" , "false" )
@@ -595,11 +594,6 @@ def _validate_chunking_strategy(chunking_strategy: Optional[str]) -> Optional[st
595
594
return chunking_strategy
596
595
597
596
598
- def _set_pdf_infer_table_structure (pdf_infer_table_structure : bool , strategy : str ) -> bool :
599
- """Avoids table inference in "fast" and "ocr_only" runs."""
600
- return strategy in ("hi_res" , "auto" ) and pdf_infer_table_structure
601
-
602
-
603
597
def get_validated_mimetype (file : UploadFile ) -> Optional [str ]:
604
598
"""The MIME-type of `file`.
605
599
0 commit comments