justin2341 commited on
Commit
d889286
·
verified ·
1 Parent(s): 732ae27

Update demo.py

Browse files
Files changed (1) hide show
  1. demo.py +3 -0
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')}