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 result["verified"],text | |
gr.Interface(inference,["image","image"],["label","text"],enable_queue=True).launch(debug=True) |