Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -41,8 +41,9 @@ def verify_image(url1):
|
|
41 |
response.raise_for_status() # Raise an exception for HTTP errors
|
42 |
# Open the image using PIL
|
43 |
img = Image.open(BytesIO(response.content))
|
|
|
44 |
# Verify the image
|
45 |
-
result = DeepFace.verify(url1, url, model_name="
|
46 |
if result['verified']:
|
47 |
flag = True
|
48 |
# Extract username from the file name
|
|
|
41 |
response.raise_for_status() # Raise an exception for HTTP errors
|
42 |
# Open the image using PIL
|
43 |
img = Image.open(BytesIO(response.content))
|
44 |
+
|
45 |
# Verify the image
|
46 |
+
result = DeepFace.verify(url1, url, model_name="Facenet", distance_metric='cosine')
|
47 |
if result['verified']:
|
48 |
flag = True
|
49 |
# Extract username from the file name
|