Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
from deepface import DeepFace
|
3 |
|
4 |
-
# Load model once
|
5 |
-
print("Loading DeepFace Model...")
|
6 |
-
model = DeepFace.build_model("VGG-Face") # Uses VGG-Face by default
|
7 |
-
|
8 |
# Face comparison function
|
9 |
def verify_faces(image1, image2):
|
10 |
-
result = DeepFace.verify(image1, image2
|
11 |
|
12 |
if result["verified"]:
|
13 |
return "β
Faces Match!", f"π Distance Score: {result['distance']:.4f}"
|
|
|
1 |
import gradio as gr
|
2 |
from deepface import DeepFace
|
3 |
|
|
|
|
|
|
|
|
|
4 |
# Face comparison function
|
5 |
def verify_faces(image1, image2):
|
6 |
+
result = DeepFace.verify(image1, image2)
|
7 |
|
8 |
if result["verified"]:
|
9 |
return "β
Faces Match!", f"π Distance Score: {result['distance']:.4f}"
|