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
fix: standardize variable naming and improve interface visibility logic in gradio_app.py
myhloli5d4263d4ad33
diff --git a/mineru/cli/gradio_app.py b/mineru/cli/gradio_app.pyindex 05d415ac..a3121ef6 100644--- a/mineru/cli/gradio_app.py+++ b/mineru/cli/gradio_app.py@@ -180,7 +180,7 @@ def to_pdf(file_path):def update_interface(backend_choice):if backend_choice in ["vlm-transformers", "vlm-sglang-engine"]:return gr.update(visible=False), gr.update(visible=False)- elif backend_choice in ["vlm-sglang-client"]: # pipeline+ elif backend_choice in ["vlm-sglang-client"]:return gr.update(visible=True), gr.update(visible=False)elif backend_choice in ["pipeline"]:return gr.update(visible=False), gr.update(visible=True)@@ -230,7 +230,7 @@ def main(example_enable, sglang_engine_enable, mem_fraction_static, torch_compiltry:print("Start init SgLang engine...")from mineru.backend.vlm.vlm_analyze import ModelSingleton- modelsingleton = ModelSingleton()+ model_singleton = ModelSingleton()model_params = {"enable_torch_compile": torch_compile_enable@@ -239,7 +239,7 @@ def main(example_enable, sglang_engine_enable, mem_fraction_static, torch_compilif mem_fraction_static is not None:model_params["mem_fraction_static"] = mem_fraction_static- predictor = modelsingleton.get_model(+ predictor = model_singleton.get_model("sglang-engine",None,None,@@ -266,8 +266,6 @@ def main(example_enable, sglang_engine_enable, mem_fraction_static, torch_compildrop_list = ["pipeline", "vlm-transformers", "vlm-sglang-client"]preferred_option = "pipeline"backend = gr.Dropdown(drop_list, label="Backend", value=preferred_option)- # with gr.Row(visible=False) as lang_options:-with gr.Row(visible=False) as client_options:url = gr.Textbox(label='Server URL', value='http://localhost:30000', placeholder='http://localhost:30000')with gr.Row(equal_height=True):