This commit is contained in:
zy123 2025-02-14 09:11:24 +08:00
parent b231e02773
commit ae16b4c75b

View File

@ -40,10 +40,7 @@ def preprocess_files(output_folder, file_path, file_type,logger):
# docx_path = pdf2docx(pdf_path) # 将pdf转换为docx以供上传到知识库
elif file_type == 3: #doc
# docx_path=doc2docx(downloaded_file_path)
if is_pure_image(file_path):
is_pure_image_flag = True
else:
pdf_path = docx2pdf(file_path) # 将docx转换为pdf以供后续处理
pdf_path = docx2pdf(file_path) # 将docx转换为pdf以供后续处理
else:
logger.error("Unsupported file type provided. Preprocessing halted.")
return None