12.19 invalid_path转md格式前增加判断
This commit is contained in:
parent
e19aaa04f6
commit
079f2a178b
@ -54,7 +54,8 @@ def convert_file_to_markdown(file_path):
|
||||
'page_details': 0, # 不包含页面细节
|
||||
'markdown_details': 1,
|
||||
'apply_document_tree': 1,
|
||||
'dpi': 216 # 分辨率设置默认为144 dpi
|
||||
'dpi': 216, # 分辨率设置默认为144 dpi,
|
||||
'get_image':None
|
||||
})
|
||||
print("request time: ", resp.elapsed.total_seconds())
|
||||
data = json.loads(resp.text)
|
||||
@ -74,6 +75,6 @@ def convert_file_to_markdown(file_path):
|
||||
|
||||
if __name__ == "__main__":
|
||||
# file_path=r"C:\Users\Administrator\Desktop\fsdownload\e702f1e6-095d-443d-bb7d-ef2e42037cb1\ztbfile_procurement.pdf"
|
||||
file_path=r"C:\Users\Administrator\Desktop\fsdownload\1073c74f-02b5-463e-a129-23c790a3c872\ztbfile_notice.docx"
|
||||
file_path=r"C:\Users\Administrator\Desktop\new招标文件\output5\HBDL-2024-0514-001-招标文件_procurement\HBDL-2024-0514-001-招标文件_procurement_1.pdf"
|
||||
res=convert_file_to_markdown(file_path)
|
||||
print(res)
|
Loading…
x
Reference in New Issue
Block a user