@@ -202,6 +202,7 @@ def pipeline_api(
202202 m_strategy = [],
203203 m_coordinates = [],
204204 m_ocr_languages = [],
205+ m_include_page_breaks = [],
205206 m_encoding = [],
206207 m_xml_keep_tags = [],
207208 m_pdf_infer_table_structure = [],
@@ -218,6 +219,7 @@ def pipeline_api(
218219 "m_strategy" : m_strategy ,
219220 "m_coordinates" : m_coordinates ,
220221 "m_ocr_languages" : m_ocr_languages ,
222+ "m_include_page_breaks" : m_include_page_breaks ,
221223 "m_encoding" : m_encoding ,
222224 "m_xml_keep_tags" : m_xml_keep_tags ,
223225 "m_pdf_infer_table_structure" : m_pdf_infer_table_structure ,
@@ -258,6 +260,11 @@ def pipeline_api(
258260
259261 ocr_languages = ("+" .join (m_ocr_languages ) if len (m_ocr_languages ) else "eng" ).lower ()
260262
263+ include_page_breaks_str = (
264+ m_include_page_breaks [0 ] if len (m_include_page_breaks ) else "false"
265+ ).lower ()
266+ include_page_breaks = include_page_breaks_str == "true"
267+
261268 encoding = m_encoding [0 ] if len (m_encoding ) else None
262269
263270 xml_keep_tags_str = (m_xml_keep_tags [0 ] if len (m_xml_keep_tags ) else "false" ).lower ()
@@ -281,6 +288,7 @@ def pipeline_api(
281288 "ocr_languages" : ocr_languages ,
282289 "coordinates" : show_coordinates ,
283290 "pdf_infer_table_structure" : pdf_infer_table_structure ,
291+ "include_page_breaks" : include_page_breaks ,
284292 "encoding" : encoding ,
285293 "model_name" : hi_res_model_name ,
286294 "xml_keep_tags" : xml_keep_tags ,
@@ -300,6 +308,7 @@ def pipeline_api(
300308 ocr_languages = ocr_languages ,
301309 coordinates = show_coordinates ,
302310 pdf_infer_table_structure = pdf_infer_table_structure ,
311+ include_page_breaks = include_page_breaks ,
303312 encoding = encoding ,
304313 model_name = hi_res_model_name ,
305314 )
@@ -311,6 +320,7 @@ def pipeline_api(
311320 strategy = strategy ,
312321 ocr_languages = ocr_languages ,
313322 pdf_infer_table_structure = pdf_infer_table_structure ,
323+ include_page_breaks = include_page_breaks ,
314324 encoding = encoding ,
315325 xml_keep_tags = xml_keep_tags ,
316326 model_name = hi_res_model_name ,
@@ -467,6 +477,7 @@ def pipeline_1(
467477 strategy : List [str ] = Form (default = []),
468478 coordinates : List [str ] = Form (default = []),
469479 ocr_languages : List [str ] = Form (default = []),
480+ include_page_breaks : List [str ] = Form (default = []),
470481 encoding : List [str ] = Form (default = []),
471482 xml_keep_tags : List [str ] = Form (default = []),
472483 pdf_infer_table_structure : List [str ] = Form (default = []),
@@ -513,6 +524,7 @@ def response_generator(is_multipart):
513524 m_strategy = strategy ,
514525 m_coordinates = coordinates ,
515526 m_ocr_languages = ocr_languages ,
527+ m_include_page_breaks = include_page_breaks ,
516528 m_encoding = encoding ,
517529 m_xml_keep_tags = xml_keep_tags ,
518530 m_pdf_infer_table_structure = pdf_infer_table_structure ,
0 commit comments