Spaces:
Build error
Build error
import re | |
def doc_number(ocr_list): | |
try: | |
for item in ocr_list: | |
if (len(item) >= 6 and item[0].isnumeric() ) or (len(item) >= 6 and (item[0].isalpha() and item[1].isnumeric())): | |
print("DOCUMENT NUMBRE IS : ", item) | |
return True, item, ocr_list | |
return False, None, ocr_list | |
except Exception as e: | |
print("Exception in doc_number : " ,str(e)) | |
return False, None, ocr_list |