vasilee commited on
Commit
b50afe5
·
verified ·
1 Parent(s): ed5cb35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -122,8 +122,8 @@ def replace_image_with_base64(markdown_text, image_dir_path):
122
 
123
  def to_markdown(file_path, end_pages, is_ocr, layout_mode, formula_enable, table_enable, language):
124
  file_path = to_pdf(file_path)
125
- if end_pages > 20:
126
- end_pages = 20
127
  # 获取识别的md文件以及压缩包文件路径
128
  local_md_dir, file_name = parse_pdf(file_path, './output', end_pages - 1, is_ocr,
129
  layout_mode, formula_enable, table_enable, language)
 
122
 
123
  def to_markdown(file_path, end_pages, is_ocr, layout_mode, formula_enable, table_enable, language):
124
  file_path = to_pdf(file_path)
125
+ if end_pages > 300:
126
+ end_pages = 300
127
  # 获取识别的md文件以及压缩包文件路径
128
  local_md_dir, file_name = parse_pdf(file_path, './output', end_pages - 1, is_ocr,
129
  layout_mode, formula_enable, table_enable, language)