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
refactor: add 'local' option for model source and comment out timing logs
myhloliab93f856f522
diff --git a/mineru/backend/vlm/vlm_analyze.py b/mineru/backend/vlm/vlm_analyze.pyindex 5335658d..8f9195c3 100644--- a/mineru/backend/vlm/vlm_analyze.py+++ b/mineru/backend/vlm/vlm_analyze.py@@ -47,11 +47,11 @@ def doc_analyze(if predictor is None:predictor = ModelSingleton().get_model(backend, model_path, server_url)- load_images_start = time.time()+ # load_images_start = time.time()images_list, pdf_doc = load_images_from_pdf(pdf_bytes)images_base64_list = [image_dict["img_base64"] for image_dict in images_list]- load_images_time = round(time.time() - load_images_start, 2)- logger.info(f"load images cost: {load_images_time}, speed: {round(len(images_base64_list)/load_images_time, 3)} images/s")+ # load_images_time = round(time.time() - load_images_start, 2)+ # logger.info(f"load images cost: {load_images_time}, speed: {round(len(images_base64_list)/load_images_time, 3)} images/s")infer_start = time.time()results = predictor.batch_predict(images=images_base64_list)diff --git a/mineru/cli/client.py b/mineru/cli/client.pyindex 532431ed..3b02fb41 100644--- a/mineru/cli/client.py+++ b/mineru/cli/client.py@@ -129,7 +129,7 @@ from .common import do_parse, read_fn, pdf_suffixes, image_suffixes'-r','--repo','model_source',- type=click.Choice(['huggingface', 'modelscope']),+ type=click.Choice(['huggingface', 'modelscope', 'local']),help="""The source of the model repository. Default is 'huggingface'.""",