Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
docs: update model source switching methods to remove CLI flag support and emphasize environment variable configuration
myhlolid2478d194585
diff --git a/docs/en/usage/model_source.md b/docs/en/usage/model_source.mdindex 6ba4ddff..9fb86ada 100644--- a/docs/en/usage/model_source.md+++ b/docs/en/usage/model_source.md@@ -7,24 +7,19 @@ MinerU uses `HuggingFace` and `ModelScope` as model repositories. Users can swit## Methods to Switch Model Sources-### Switch via Command Line Parameters-Currently, only the `mineru` command line tool supports switching model sources through command line parameters. Other command line tools such as `mineru-api`, `mineru-gradio`, etc., do not support this yet.-```bash-mineru -p <input_path> -o <output_path> --source modelscope-```--### Switch via Environment Variables-You can switch model sources by setting environment variables in any situation. This applies to all command line tools and API calls.+### Configure via Environment Variables+MinerU configures model sources through the `MINERU_MODEL_SOURCE` environment variable. This applies to all command line tools and API calls.```bashexport MINERU_MODEL_SOURCE=modelscope+mineru -p <input_path> -o <output_path>```-or+or set it programmatically:```pythonimport osos.environ["MINERU_MODEL_SOURCE"] = "modelscope"```>[!TIP]-> Model sources set through environment variables will take effect in the current terminal session until the terminal is closed or the environment variable is modified. They have higher priority than command line parameters - if both command line parameters and environment variables are set, the command line parameters will be ignored.+> MinerU no longer provides a CLI flag for model source selection. Model sources set through environment variables take effect in the current terminal session until the terminal is closed or the environment variable is modified.## Using Local Models@@ -46,10 +41,7 @@ mineru-models-download### 2. Use Local Models for Parsing-```bash-mineru -p <input_path> -o <output_path> --source local-```-or enable through environment variables:+Enable local models through environment variables:```bashexport MINERU_MODEL_SOURCE=localmineru -p <input_path> -o <output_path>diff --git a/docs/zh/usage/model_source.md b/docs/zh/usage/model_source.mdindex 520b51b4..ff73cd87 100644--- a/docs/zh/usage/model_source.md+++ b/docs/zh/usage/model_source.md@@ -7,24 +7,19 @@ MinerU使用 `HuggingFace` 和 `ModelScope` 作为模型仓库,用户可以根## 模型源的切换方法-### 通过命令行参数切换-目前仅`mineru`命令行工具支持通过命令行参数切换模型源,其他命令行工具如`mineru-api`、`mineru-gradio`等暂不支持。-```bash-mineru -p <input_path> -o <output_path> --source modelscope-```-### 通过环境变量切换-在任何情况下可以通过设置环境变量来切换模型源,这适用于所有命令行工具和API调用。+MinerU 通过 `MINERU_MODEL_SOURCE` 环境变量配置模型源,这适用于所有命令行工具和 API 调用。```bashexport MINERU_MODEL_SOURCE=modelscope+mineru -p <input_path> -o <output_path>```-或+或在代码中设置:```pythonimport osos.environ["MINERU_MODEL_SOURCE"] = "modelscope"```>[!TIP]-> 通过环境变量设置的模型源会在当前终端会话中生效,直到终端关闭或环境变量被修改。且优先级高于命令行参数,如同时设置了命令行参数和环境变量,命令行参数将被忽略。+> MinerU 已不再提供用于切换模型源的命令行参数。通过环境变量设置的模型源会在当前终端会话中生效,直到终端关闭或环境变量被修改。## 使用本地模型@@ -47,10 +42,7 @@ mineru-models-download### 2. 使用本地模型进行解析-```bash-mineru -p <input_path> -o <output_path> --source local-```-或通过环境变量启用:+通过环境变量启用本地模型:```bashexport MINERU_MODEL_SOURCE=localmineru -p <input_path> -o <output_path>