Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

refactor: remove vllm engine references and streamline backend choice handling in Gradio app

myhloliefc428115cb4
diff --git a/docker/compose.yaml b/docker/compose.yaml
index abd4b7d5..2ff25673 100644
--- a/docker/compose.yaml
+++ b/docker/compose.yaml
@@ -10,7 +10,6 @@ services:
MINERU_MODEL_SOURCE: local
entrypoint: mineru-openai-server
command:
- --engine vllm
--host 0.0.0.0
--port 30000
# --data-parallel-size 2 # If using multiple GPUs, increase throughput using vllm's multi-GPU parallel mode
@@ -70,7 +69,6 @@ services:
command:
--server-name 0.0.0.0
--server-port 7860
- --enable-vllm-engine true # Enable the vllm engine for Gradio
# --enable-api false # If you want to disable the API, set this to false
# --max-convert-pages 20 # If you want to limit the number of pages for conversion, set this to a specific number
# parameters for vllm-engine
diff --git a/mineru/cli/gradio_app.py b/mineru/cli/gradio_app.py
index 2cb34cdb..c04c51af 100644
--- a/mineru/cli/gradio_app.py
+++ b/mineru/cli/gradio_app.py
@@ -352,16 +352,16 @@ def main(ctx,
def update_interface(backend_choice):
formula_label_update = gr.update(label=get_formula_label(backend_choice), info=get_formula_info(backend_choice))
backend_info_update = gr.update(info=get_backend_info(backend_choice))
- if backend_choice in ["vlm-auto-engine"]:
- return gr.update(visible=False), gr.update(visible=False), formula_label_update, backend_info_update
- elif backend_choice in ["vlm-http-client"]:
- return gr.update(visible=True), gr.update(visible=False), formula_label_update, backend_info_update
- elif backend_choice in ["hybrid-http-client"]:
- return gr.update(visible=True), gr.update(visible=True), formula_label_update, backend_info_update
- elif backend_choice in ["pipeline","hybrid-auto-engine"]:
- return gr.update(visible=False), gr.update(visible=True), formula_label_update, backend_info_update
+ if "http-client" in backend_choice:
+ client_options_update = gr.update(visible=True)
else:
- return gr.update(), gr.update(), formula_label_update, backend_info_update
+ client_options_update = gr.update(visible=False)
+ if "vlm" in backend_choice:
+ ocr_options_update = gr.update(visible=False)
+ else:
+ ocr_options_update = gr.update(visible=True)
+
+ return client_options_update, ocr_options_update, formula_label_update, backend_info_update
kwargs.update(arg_parse(ctx))