Spaces:
Running
Running
justin2341
commited on
Update demo.py
Browse files
demo.py
CHANGED
@@ -5,6 +5,9 @@ from PIL import Image
|
|
5 |
|
6 |
|
7 |
def idcard_recognition(frame1, frame2):
|
|
|
|
|
|
|
8 |
url = "http://127.0.0.1:8080/idcard_recognition_multi_page"
|
9 |
if frame2 is None:
|
10 |
files = {'file1': open(frame1, 'rb')}
|
|
|
5 |
|
6 |
|
7 |
def idcard_recognition(frame1, frame2):
|
8 |
+
if frame1 is None:
|
9 |
+
return ["Front Image Empty", None]
|
10 |
+
|
11 |
url = "http://127.0.0.1:8080/idcard_recognition_multi_page"
|
12 |
if frame2 is None:
|
13 |
files = {'file1': open(frame1, 'rb')}
|