Update local.py

This commit is contained in:
HIllya51 2024-01-17 00:26:22 +08:00
parent ca647fe151
commit 41eae738ac

View File

@ -35,8 +35,10 @@ class ocrwrapper:
self._OcrInit(det,rec,key)
def ocr(self,path,name,angle=0):
try:
self._OcrDetect(path,name,angle)
return self._OcrGet().decode('utf8')
if (self._OcrDetect(path,name,angle) ):
return self._OcrGet().decode('utf8')
else:
return ''
except:
return ''