Ahsen Khaliq commited on
Commit
14ffa36
1 Parent(s): 6f20f0a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from deepface import DeepFace
3
+
4
+ def inference(image1,image2):
5
+ result = DeepFace.verify(img1_path = image1, img2_path = image2)
6
+ if result["verified"]:
7
+ text = "same person"
8
+ else:
9
+ text = "different person"
10
+ return result["verified"],text
11
+ gr.Interface(inference,["image","image"],["label","text"],enable_queue=True).launch(debug=True)