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(model): make language parameter optional in get_model
myhlolif9841a0c2b57
diff --git a/magic_pdf/model/doc_analyze_by_custom_model.py b/magic_pdf/model/doc_analyze_by_custom_model.pyindex 90c24c30..e60f1b42 100644--- a/magic_pdf/model/doc_analyze_by_custom_model.py+++ b/magic_pdf/model/doc_analyze_by_custom_model.py@@ -57,7 +57,7 @@ class ModelSingleton:cls._instance = super().__new__(cls)return cls._instance- def get_model(self, ocr: bool, show_log: bool, lang):+ def get_model(self, ocr: bool, show_log: bool, lang=None):key = (ocr, show_log, lang)if key not in self._models:self._models[key] = custom_model_init(ocr=ocr, show_log=show_log, lang=lang)