update scipdf_parser dep
This commit is contained in:
parent
77a6105a9a
commit
347124c967
@ -24,10 +24,11 @@ def 批量翻译PDF文档(txt, llm_kwargs, plugin_kwargs, chatbot, history, syst
|
|||||||
try:
|
try:
|
||||||
import fitz
|
import fitz
|
||||||
import tiktoken
|
import tiktoken
|
||||||
|
import scipdf
|
||||||
except:
|
except:
|
||||||
report_execption(chatbot, history,
|
report_execption(chatbot, history,
|
||||||
a=f"解析项目: {txt}",
|
a=f"解析项目: {txt}",
|
||||||
b=f"导入软件依赖失败。使用该模块需要额外依赖,安装方法```pip install --upgrade pymupdf tiktoken```。")
|
b=f"导入软件依赖失败。使用该模块需要额外依赖,安装方法```pip install --upgrade pymupdf tiktoken scipdf_parser```。")
|
||||||
yield from update_ui(chatbot=chatbot, history=history) # 刷新界面
|
yield from update_ui(chatbot=chatbot, history=history) # 刷新界面
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -58,7 +59,6 @@ def 批量翻译PDF文档(txt, llm_kwargs, plugin_kwargs, chatbot, history, syst
|
|||||||
|
|
||||||
def 解析PDF_基于GROBID(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, grobid_url):
|
def 解析PDF_基于GROBID(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, grobid_url):
|
||||||
import copy
|
import copy
|
||||||
import tiktoken
|
|
||||||
TOKEN_LIMIT_PER_FRAGMENT = 1280
|
TOKEN_LIMIT_PER_FRAGMENT = 1280
|
||||||
generated_conclusion_files = []
|
generated_conclusion_files = []
|
||||||
generated_html_files = []
|
generated_html_files = []
|
||||||
|
@ -20,4 +20,4 @@ arxiv
|
|||||||
rich
|
rich
|
||||||
pypdf2==2.12.1
|
pypdf2==2.12.1
|
||||||
websocket-client
|
websocket-client
|
||||||
scipdf_parser==0.3
|
scipdf_parser>=0.3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user