优化加载逻辑
This commit is contained in:
parent
927a7abf99
commit
5ab1b5c1f1
@ -118,8 +118,6 @@ class OCRPlugin:
|
||||
:param pdf_path: PDF文件路径
|
||||
:return: 提取的文本
|
||||
"""
|
||||
if self.ocr is None:
|
||||
self.load_model()
|
||||
|
||||
if not os.path.exists(pdf_path):
|
||||
raise FileNotFoundError(f"PDF file not found: {pdf_path}")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user