Spaces:
Sleeping
Sleeping
change threshold of the model similarity
Browse files
app.py
CHANGED
@@ -87,7 +87,7 @@ def process_images(image1, image2):
|
|
87 |
embedding2 = embedding2.flatten()
|
88 |
|
89 |
euclidean_dist = euclidean_distance(embedding1, embedding2)
|
90 |
-
is_match = euclidean_dist < 0.
|
91 |
|
92 |
# Calculate confidence
|
93 |
confidence = max(0.0, 1.0 - euclidean_dist / 1.0) # Ensure confidence is between 0 and 1
|
|
|
87 |
embedding2 = embedding2.flatten()
|
88 |
|
89 |
euclidean_dist = euclidean_distance(embedding1, embedding2)
|
90 |
+
is_match = euclidean_dist < 0.8
|
91 |
|
92 |
# Calculate confidence
|
93 |
confidence = max(0.0, 1.0 - euclidean_dist / 1.0) # Ensure confidence is between 0 and 1
|