Warlord-K commited on
Commit
3680d88
1 Parent(s): 40eb04b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -18,7 +18,10 @@ for r, _, f in os.walk(os.getcwd() + "/images"):
18
 
19
  source_faces = []
20
  for img in source_imgs:
21
- source_faces.append(extract_faces(detector, img)[-1])
 
 
 
22
  source_embeddings = get_embeddings(model, source_faces)
23
 
24
  def find_names(image):
 
18
 
19
  source_faces = []
20
  for img in source_imgs:
21
+ try:
22
+ source_faces.append(extract_faces(detector, img)[-1])
23
+ except:
24
+ print(f"{img} not found, Skipping.")
25
  source_embeddings = get_embeddings(model, source_faces)
26
 
27
  def find_names(image):