Warlord-K commited on
Commit
af782b7
1 Parent(s): 34a7c74
Files changed (3) hide show
  1. .gitignore +1 -0
  2. app.py +1 -1
  3. helpers.py +1 -1
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ password.txt
app.py CHANGED
@@ -42,7 +42,7 @@ def find_names(image):
42
  names = []
43
  for i in ids:
44
  names.append(source_imgs[i].split("/")[-1].split(".")[0])
45
- recognition(imgs, ids, names, source_faces)
46
  return ",".join(names), "Recognition.jpg"
47
 
48
  demo = gr.Interface(
 
42
  names = []
43
  for i in ids:
44
  names.append(source_imgs[i].split("/")[-1].split(".")[0])
45
+ recognition(imgs, ids, names, source_faces, d, source_imgs)
46
  return ",".join(names), "Recognition.jpg"
47
 
48
  demo = gr.Interface(
helpers.py CHANGED
@@ -31,7 +31,7 @@ def findCosineDistance(source_representation, test_representation):
31
  c = np.sum(np.multiply(test_representation, test_representation))
32
  return 1 - (a / (np.sqrt(b) * np.sqrt(c)))
33
 
34
- def recognition(imgs, ids, names, source_faces):
35
  cols = 4
36
  rows = int(np.ceil(len(imgs)/2))
37
  img_count = 0
 
31
  c = np.sum(np.multiply(test_representation, test_representation))
32
  return 1 - (a / (np.sqrt(b) * np.sqrt(c)))
33
 
34
+ def recognition(imgs, ids, names, source_faces, d, source_imgs):
35
  cols = 4
36
  rows = int(np.ceil(len(imgs)/2))
37
  img_count = 0