Ahsen Khaliq commited on
Commit
c2d5008
1 Parent(s): 88aced2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ def inference(image1,image2):
9
  text = "same person"
10
  else:
11
  text = "different person"
12
- return text
13
 
14
  examples=[['mona.jpeg','mona.jpeg'],['mona.jpeg','pearl.jpeg']]
15
 
@@ -17,4 +17,4 @@ title = "DeepFace"
17
  description = "Gradio demo for DeepFace for face verification: verifies face pairs as same person or different persons. To use it, simply upload your images, or click one of the examples to load them. Read more at the links below."
18
  article = "<p style='text-align: center'><a href='https://github.com/serengil/deepface' target='_blank'>Github Repo</a></p>"
19
 
20
- gr.Interface(inference,["image","image"],"text",enable_queue=True,examples=examples, title=title,description=description,article=article).launch(debug=True)
9
  text = "same person"
10
  else:
11
  text = "different person"
12
+ return result["verified"],result["distance"],result["max_threshold_to_verify"],result["model"],result["similarity_metric"]
13
 
14
  examples=[['mona.jpeg','mona.jpeg'],['mona.jpeg','pearl.jpeg']]
15
 
17
  description = "Gradio demo for DeepFace for face verification: verifies face pairs as same person or different persons. To use it, simply upload your images, or click one of the examples to load them. Read more at the links below."
18
  article = "<p style='text-align: center'><a href='https://github.com/serengil/deepface' target='_blank'>Github Repo</a></p>"
19
 
20
+ gr.Interface(inference,["image","image"],[gr.outputs.Label(label="same person"),gr.outputs.Label(label="distance"),gr.outputs.Label(label="max threshold to verify"),gr.outputs.Label(label="model"),gr.outputs.Label(label="similarity metric")],enable_queue=True,examples=examples, title=title,description=description,article=article,theme="dark").launch(debug=True)