bugfix img filepath
Browse files
app.py
CHANGED
|
@@ -61,7 +61,7 @@ def greet(image_to_test):
|
|
| 61 |
face_distance = face_distances[idx]
|
| 62 |
ret = "The most similar person is of {} with score {:.3}".format(os.path.splitext(filepath)[0],
|
| 63 |
100 * (1 - face_distance))
|
| 64 |
-
img = face_recognition.load_image_file(filepath)
|
| 65 |
return img, ret
|
| 66 |
|
| 67 |
iface = gr.Interface(fn=greet, inputs=gr.Image(type="numpy"), outputs=["image", "text"])
|
|
|
|
| 61 |
face_distance = face_distances[idx]
|
| 62 |
ret = "The most similar person is of {} with score {:.3}".format(os.path.splitext(filepath)[0],
|
| 63 |
100 * (1 - face_distance))
|
| 64 |
+
img = face_recognition.load_image_file(os.path.join("data", filepath))
|
| 65 |
return img, ret
|
| 66 |
|
| 67 |
iface = gr.Interface(fn=greet, inputs=gr.Image(type="numpy"), outputs=["image", "text"])
|