From 5110bba898ec612803ee375a8e1b196f8dd7a548 Mon Sep 17 00:00:00 2001 From: xunbu Date: Wed, 20 Aug 2025 15:54:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmodel=5Fversion=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docutranslate/app.py | 4 ++-- docutranslate/converter/x2md/converter_mineru.py | 2 +- docutranslate/static/index.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docutranslate/app.py b/docutranslate/app.py index 01fad82..86b4e6f 100644 --- a/docutranslate/app.py +++ b/docutranslate/app.py @@ -220,7 +220,7 @@ class MarkdownWorkflowParams(BaseWorkflowParams): mineru_token: Optional[str] = Field(None, description="当 `convert_engine` 为 'mineru' 时必填的API令牌。") formula_ocr: bool = Field(True, description="是否对公式进行OCR识别。对 `mineru` 和 `docling` 均有效。") code_ocr: bool = Field(True, description="是否对代码块进行OCR识别。仅 `docling` 引擎有效。") - model_version: Literal["pipline", "vlm"] = Field("vlm", description="Mineru模型的版本,'vlm'是更新的版本。仅 `mineru` 引擎有效。") + model_version: Literal["pipeline", "vlm"] = Field("vlm", description="Mineru模型的版本,'vlm'是更新的版本。仅 `mineru` 引擎有效。") @field_validator('mineru_token') def check_mineru_token(cls, v, values): @@ -1216,7 +1216,7 @@ async def temp_translate( temperature: float = Body(default_params["temperature"]), thinking: ThinkingMode = Body(default_params["thinking"]), chunk_size: int = Body(default_params["chunk_size"]), custom_prompt: Optional[str] = Body(None), - model_version: Literal["pipline", "vlm"] = Body("vlm"), + model_version: Literal["pipeline", "vlm"] = Body("vlm"), ): file_name = Path(file_name) try: diff --git a/docutranslate/converter/x2md/converter_mineru.py b/docutranslate/converter/x2md/converter_mineru.py index dc2b1ea..8e5cf3b 100644 --- a/docutranslate/converter/x2md/converter_mineru.py +++ b/docutranslate/converter/x2md/converter_mineru.py @@ -18,7 +18,7 @@ URL = 'https://mineru.net/api/v4/file-urls/batch' class ConverterMineruConfig(X2MarkdownConverterConfig): mineru_token: str formula_ocr: bool = True - model_version: Literal["pipline", "vlm"] = "vlm" + model_version: Literal["pipeline", "vlm"] = "vlm" def gethash(self) -> Hashable: return self.formula_ocr,self.model_version diff --git a/docutranslate/static/index.html b/docutranslate/static/index.html index 708d303..7ab0574 100644 --- a/docutranslate/static/index.html +++ b/docutranslate/static/index.html @@ -1 +1 @@ - DocuTranslate - 交互式文档翻译

DocuTranslate

如果上传的文件本身是.md格式,此项可不选。
mineru VLM是更新的内测模型。

GitHub主页(欢迎star❤):
https://github.com/xunbu/docutranslate

交流QQ群: 1047781902

任务列表

当前没有任务,点击“新建任务”开始吧!

预览
原文
译文
\ No newline at end of file + DocuTranslate - 交互式文档翻译

DocuTranslate

如果上传的文件本身是.md格式,此项可不选。
mineru VLM是更新的内测模型。

GitHub主页(欢迎star❤):
https://github.com/xunbu/docutranslate

交流QQ群: 1047781902

任务列表

当前没有任务,点击“新建任务”开始吧!

预览
原文
译文
\ No newline at end of file