diff --git a/README.md b/README.md index cfe96b6..e3ab1b1 100644 --- a/README.md +++ b/README.md @@ -221,6 +221,6 @@ Web UI 可以实现如下功能: - [x] VUE 前端 ## 项目交流群 -![二维码](img/qr_code_24.jpg) +![二维码](img/qr_code_25.JPG) 🎉 langchain-ChatGLM 项目交流群,如果你也对本项目感兴趣,欢迎加入群聊参与讨论交流。 diff --git a/img/qr_code_25.JPG b/img/qr_code_25.JPG new file mode 100644 index 0000000..89bb71f Binary files /dev/null and b/img/qr_code_25.JPG differ diff --git a/loader/pdf_loader.py b/loader/pdf_loader.py index 8f55a94..e43169d 100644 --- a/loader/pdf_loader.py +++ b/loader/pdf_loader.py @@ -39,7 +39,8 @@ class UnstructuredPaddlePDFLoader(UnstructuredFileLoader): result = ocr.ocr(img_name) ocr_result = [i[1][0] for line in result for i in line] fout.write("\n".join(ocr_result)) - os.remove(img_name) + if os.path.exists(img_name): + os.remove(img_name) return txt_file_path txt_file_path = pdf_ocr_txt(self.file_path)