File size: 878 Bytes
ae57c29
 
14ffa36
 
 
ae57c29
14ffa36
 
 
 
 
 
d6facd1
 
7182041
88ce3ac
 
 
 
 
41bb552
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import os
os.system("pip freeze")
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']]

title = "DeepFace"
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."
article = "<p style='text-align: center'><a href='https://github.com/serengil/deepface' target='_blank'>Github Repo</a></p>"

gr.Interface(inference,["image","image"],"label",enable_queue=True,examples=examples, title=title,description=description,article=article).launch(debug=True)