Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ def predict(im1, im2):
|
|
9 |
embeddings = model.encode([im1,im2])
|
10 |
cos_sim = cosine_similarity(embeddings)
|
11 |
sim = cos_sim[0][1]
|
12 |
-
if sim > 0.
|
13 |
return sim, "SAME PERSON, UNLOCK PHONE"
|
14 |
else:
|
15 |
return sim, "DIFFERENT PEOPLE, DON'T UNLOCK"
|
|
|
9 |
embeddings = model.encode([im1,im2])
|
10 |
cos_sim = cosine_similarity(embeddings)
|
11 |
sim = cos_sim[0][1]
|
12 |
+
if sim > 0.90:# THRESHOLD HERE
|
13 |
return sim, "SAME PERSON, UNLOCK PHONE"
|
14 |
else:
|
15 |
return sim, "DIFFERENT PEOPLE, DON'T UNLOCK"
|