Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,9 +9,9 @@ def predict(im1, im2):
|
|
9 |
sim = cosine_similarity(emb1.reshape(1, -1), emb2.reshape(1, -1))[0][0]
|
10 |
|
11 |
if sim > theta:
|
12 |
-
return sim,
|
13 |
else:
|
14 |
-
return sim,
|
15 |
|
16 |
interface = gr.Interface(fn=predict,
|
17 |
inputs= [gr.Image(type="pil", source="webcam"),
|
|
|
9 |
sim = cosine_similarity(emb1.reshape(1, -1), emb2.reshape(1, -1))[0][0]
|
10 |
|
11 |
if sim > theta:
|
12 |
+
return sim, 'User authenticated. Phone unlocked'
|
13 |
else:
|
14 |
+
return sim, 'Unrecognized user. Unable to unlock phone'
|
15 |
|
16 |
interface = gr.Interface(fn=predict,
|
17 |
inputs= [gr.Image(type="pil", source="webcam"),
|