Spaces:
Sleeping
Sleeping
Create kyc_processor.py
Browse files- modules/kyc_processor.py +9 -0
modules/kyc_processor.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pytesseract
|
2 |
+
import cv2
|
3 |
+
|
4 |
+
def extract_text_from_id(image_path):
|
5 |
+
image = cv2.imread(image_path)
|
6 |
+
return pytesseract.image_to_string(image)
|
7 |
+
|
8 |
+
def verify_id(document_text):
|
9 |
+
return "Name" in document_text and "DOB" in document_text # simple example
|