Spaces:
Running
Running
Update app.py
Browse files
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 >
|
126 |
-
end_pages =
|
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)
|