VishyVish commited on
Commit
61e74de
·
1 Parent(s): 8c55385

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -12,14 +12,14 @@ def predict(im1, im2):
12
  sim = cosine_similarity(embeddings)
13
  sim = sim[0, 1]
14
  if sim > 0.75:
15
- return sim, "SAME PERSON, UNLOCK PHONE"
16
  else:
17
- return sim, "DIFFERENT PEOPLE, DON'T UNLOCK"
18
 
19
 
20
  interface = gr.Interface(fn=predict,
21
- inputs= [gr.Image(value = dataset['train']['image'][0], type="pil", source="webcam"),
22
- gr.Image(value = dataset['train']['image'][1], type="pil", source="webcam")],
23
  outputs= [gr.Number(label="Similarity"),
24
  gr.Textbox(label="Message")],
25
  title = 'Face ID',
 
12
  sim = cosine_similarity(embeddings)
13
  sim = sim[0, 1]
14
  if sim > 0.75:
15
+ return sim, "SAME PERSON, AUTHORIZE PAYMENT"
16
  else:
17
+ return sim, "DIFFERENT PEOPLE, DON'T AUTHORIZE PAYMENT"
18
 
19
 
20
  interface = gr.Interface(fn=predict,
21
+ inputs= [gr.Image(value = dataset['train']['image'][10], type="pil", source="webcam"),
22
+ gr.Image(value = dataset['train']['image'][17], type="pil", source="webcam")],
23
  outputs= [gr.Number(label="Similarity"),
24
  gr.Textbox(label="Message")],
25
  title = 'Face ID',