myhloli commited on
Commit
037c8f0
·
verified ·
1 Parent(s): 79464a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -112,6 +112,8 @@ def replace_image_with_base64(markdown_text, image_dir_path):
112
 
113
  def to_markdown(file_path, end_pages, is_ocr, layout_mode, formula_enable, table_enable, language):
114
  file_path = to_pdf(file_path)
 
 
115
  # 获取识别的md文件以及压缩包文件路径
116
  local_md_dir, file_name = parse_pdf(file_path, './output', end_pages - 1, is_ocr,
117
  layout_mode, formula_enable, table_enable, language)
 
112
 
113
  def to_markdown(file_path, end_pages, is_ocr, layout_mode, formula_enable, table_enable, language):
114
  file_path = to_pdf(file_path)
115
+ if end_pages > 20:
116
+ end_pages = 20
117
  # 获取识别的md文件以及压缩包文件路径
118
  local_md_dir, file_name = parse_pdf(file_path, './output', end_pages - 1, is_ocr,
119
  layout_mode, formula_enable, table_enable, language)