File size: 380 Bytes
14ffa36
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
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)