mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-27 15:44:12 +08:00
Update local.py
This commit is contained in:
parent
ca647fe151
commit
41eae738ac
@ -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 ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user