Prepare 2.7.3 release (#11826)
* fix: Correct misuse of `try_import` from `paddle.utils` (#11820) This commit addresses the incorrect usage of the `try_import` function from `paddle.utils` in both `ppocr/utils/utility.py` and `ppstructure/pdf2word/pdf2word.py`. * bump version to 2.7.3 --------- Co-authored-by: NeterOster <neteroster@gmail.com>pull/11828/head^2 v2.7.3
parent
89e0a15ce7
commit
ddaa85ddaf
|
@ -59,7 +59,7 @@ __all__ = [
|
|||
]
|
||||
|
||||
SUPPORT_DET_MODEL = ['DB']
|
||||
VERSION = '2.7.2'
|
||||
VERSION = '2.7.3'
|
||||
SUPPORT_REC_MODEL = ['CRNN', 'SVTR_LCNet']
|
||||
BASE_DIR = os.path.expanduser("~/.paddleocr/")
|
||||
|
||||
|
|
|
@ -108,7 +108,8 @@ def check_and_read(img_path):
|
|||
return imgvalue, True, False
|
||||
elif os.path.basename(img_path)[-3:].lower() == 'pdf':
|
||||
from paddle.utils import try_import
|
||||
try_import('fitz')
|
||||
|
||||
fitz = try_import("fitz")
|
||||
from PIL import Image
|
||||
imgs = []
|
||||
with fitz.open(img_path) as pdf:
|
||||
|
|
|
@ -21,9 +21,9 @@ import functools
|
|||
import cv2
|
||||
import platform
|
||||
import numpy as np
|
||||
import fitz
|
||||
from paddle.utils import try_import
|
||||
try_import('fitz')
|
||||
fitz = try_import("fitz")
|
||||
|
||||
from PIL import Image
|
||||
from pdf2docx.converter import Converter
|
||||
from qtpy.QtWidgets import QApplication, QWidget, QPushButton, QProgressBar, \
|
||||
|
|
Loading…
Reference in New Issue