mirror of
https://github.com/opendatalab/MinerU.git
synced 2026-03-27 11:08:32 +07:00
refactor: remove vllm engine references and streamline backend choice handling in Gradio app
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user