import easyocr def ocr(img,reader): result = reader.readtext(img,details=0) if result: return True return False