Spaces:
Sleeping
Sleeping
Commit
·
125fa7c
1
Parent(s):
285fa46
fix(fix "gbk" encode error in 批量总结PDF文档 line14):
Browse files
crazy_functions/批量总结PDF文档.py
CHANGED
|
@@ -11,6 +11,7 @@ def 解析PDF(file_manifest, project_folder, top_p, temperature, chatbot, histor
|
|
| 11 |
file_content = ""
|
| 12 |
for page in doc:
|
| 13 |
file_content += page.get_text()
|
|
|
|
| 14 |
print(file_content)
|
| 15 |
|
| 16 |
prefix = "接下来请你逐文件分析下面的论文文件,概括其内容" if index==0 else ""
|
|
|
|
| 11 |
file_content = ""
|
| 12 |
for page in doc:
|
| 13 |
file_content += page.get_text()
|
| 14 |
+
file_content = file_content.encode('gbk', 'ignore').decode('gbk')
|
| 15 |
print(file_content)
|
| 16 |
|
| 17 |
prefix = "接下来请你逐文件分析下面的论文文件,概括其内容" if index==0 else ""
|