deepface / app.py
Ahsen Khaliq
Update app.py
d6facd1
raw history blame
No virus
409 Bytes
import gradio as gr
from deepface import DeepFace
def inference(image1,image2):
result = DeepFace.verify(img1_path = image1, img2_path = image2)
if result["verified"]:
text = "same person"
else:
text = "different person"
return text
examples=['mona.jpeg','mona.jpeg']
gr.Interface(inference,["image","image"],"text",enable_queue=True,examples=examples).launch(debug=True)