Update app.py
Browse files
app.py
CHANGED
|
@@ -59,8 +59,9 @@ def greet(image_to_test):
|
|
| 59 |
idx = face_distances.argmin()
|
| 60 |
filepath = known_persons[idx]
|
| 61 |
face_distance = face_distances[idx]
|
| 62 |
-
ret = "The most similar person is of {} with score {:.3}".format(
|
| 63 |
-
|
|
|
|
| 64 |
img = face_recognition.load_image_file(os.path.join("data", filepath))
|
| 65 |
return img, ret
|
| 66 |
|
|
|
|
| 59 |
idx = face_distances.argmin()
|
| 60 |
filepath = known_persons[idx]
|
| 61 |
face_distance = face_distances[idx]
|
| 62 |
+
ret = "The most similar person is of {} with score {:.3}".format(
|
| 63 |
+
os.path.splitext(filepath)[0],
|
| 64 |
+
100 * (1 - face_distance))
|
| 65 |
img = face_recognition.load_image_file(os.path.join("data", filepath))
|
| 66 |
return img, ret
|
| 67 |
|