schrilax commited on
Commit
6f36334
1 Parent(s): 9d3ebc8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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, "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"),
 
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"),