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(ocr): update device parameter handling in paddleocr2pytorch
myhloli45f50826139a
diff --git a/magic_pdf/model/sub_modules/ocr/paddleocr2pytorch/pytorch_paddle.py b/magic_pdf/model/sub_modules/ocr/paddleocr2pytorch/pytorch_paddle.pyindex 24d39e9a..448bfda9 100644--- a/magic_pdf/model/sub_modules/ocr/paddleocr2pytorch/pytorch_paddle.py+++ b/magic_pdf/model/sub_modules/ocr/paddleocr2pytorch/pytorch_paddle.py@@ -80,7 +80,7 @@ class PytorchPaddleOCR(TextSystem):kwargs['rec_char_dict_path'] = os.path.join(root_dir, 'pytorchocr', 'utils', 'resources', 'dict', dict_file)# kwargs['rec_batch_num'] = 8- kwargs['device'] = get_device()+ kwargs['device'] = devicedefault_args = vars(args)default_args.update(kwargs)