Merge branch 'master' into dev

This commit is contained in:
imClumsyPanda 2023-05-31 18:06:07 +08:00
commit a072905893
3 changed files with 3 additions and 2 deletions

View File

@ -221,6 +221,6 @@ Web UI 可以实现如下功能:
- [x] VUE 前端
## 项目交流群
![二维码](img/qr_code_24.jpg)
![二维码](img/qr_code_25.JPG)
🎉 langchain-ChatGLM 项目交流群,如果你也对本项目感兴趣,欢迎加入群聊参与讨论交流。

BIN
img/qr_code_25.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

View File

@ -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)