Update app.py
Browse files
app.py
CHANGED
|
@@ -120,8 +120,7 @@ def extract_result(lst):
|
|
| 120 |
name=lst[x][1][1]
|
| 121 |
country=lst[x][1][2]
|
| 122 |
nationality=lst[x][1][3]
|
| 123 |
-
|
| 124 |
-
print("idk")
|
| 125 |
try:
|
| 126 |
birth_date=datetime.strptime(lst[x][1][4], '%y%m%d').strftime('%d/%m/%Y')
|
| 127 |
expiry_date=datetime.strptime(lst[x][1][5], '%y%m%d').strftime('%d/%m/%Y')
|
|
@@ -175,8 +174,7 @@ def extract_result(lst):
|
|
| 175 |
nationality=lst[x][3]
|
| 176 |
if country=="IMD":
|
| 177 |
country="IND"
|
| 178 |
-
|
| 179 |
-
print("idk2")
|
| 180 |
try:
|
| 181 |
|
| 182 |
birth_date=datetime.strptime(lst[x][4], '%y%m%d').strftime('%d/%m/%Y')
|
|
@@ -287,9 +285,7 @@ async def _file_upload(img:UploadFile = File(...)):
|
|
| 287 |
img.filename = f"{uuid.uuid4()}.jpg"
|
| 288 |
|
| 289 |
contents = await img.read() # <-- Important!
|
| 290 |
-
|
| 291 |
-
print("ok")
|
| 292 |
-
|
| 293 |
mrzscanner.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMTAxNjIyNjAzLVRYbEVaWE5yZEc5d1VISnZhbDlrYkhJIiwib3JnYW5pemF0aW9uSUQiOiIxMDE2MjI2MDMiLCJjaGVja0NvZGUiOjE4ODA3MzYyNzN9")
|
| 294 |
|
| 295 |
# mrzscanner.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTE2NDk4Mjk3OTI2MzUiLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInNlc3Npb25QYXNzd29yZCI6IndTcGR6Vm05WDJrcEQ5YUoifQ==")
|
|
|
|
| 120 |
name=lst[x][1][1]
|
| 121 |
country=lst[x][1][2]
|
| 122 |
nationality=lst[x][1][3]
|
| 123 |
+
|
|
|
|
| 124 |
try:
|
| 125 |
birth_date=datetime.strptime(lst[x][1][4], '%y%m%d').strftime('%d/%m/%Y')
|
| 126 |
expiry_date=datetime.strptime(lst[x][1][5], '%y%m%d').strftime('%d/%m/%Y')
|
|
|
|
| 174 |
nationality=lst[x][3]
|
| 175 |
if country=="IMD":
|
| 176 |
country="IND"
|
| 177 |
+
|
|
|
|
| 178 |
try:
|
| 179 |
|
| 180 |
birth_date=datetime.strptime(lst[x][4], '%y%m%d').strftime('%d/%m/%Y')
|
|
|
|
| 285 |
img.filename = f"{uuid.uuid4()}.jpg"
|
| 286 |
|
| 287 |
contents = await img.read() # <-- Important!
|
| 288 |
+
|
|
|
|
|
|
|
| 289 |
mrzscanner.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMTAxNjIyNjAzLVRYbEVaWE5yZEc5d1VISnZhbDlrYkhJIiwib3JnYW5pemF0aW9uSUQiOiIxMDE2MjI2MDMiLCJjaGVja0NvZGUiOjE4ODA3MzYyNzN9")
|
| 290 |
|
| 291 |
# mrzscanner.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTE2NDk4Mjk3OTI2MzUiLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInNlc3Npb25QYXNzd29yZCI6IndTcGR6Vm05WDJrcEQ5YUoifQ==")
|