File size: 1,296 Bytes
e50136c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0ade685
e50136c
 
 
 
8fa56f0
e50136c
 
0e70234
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import gradio as gr
import pipeline


title="EfficientNetV2 Deepfakes Video Detector"
description="EfficientNetV2 Deepfakes Image Detector by using frame-by-frame detection."
            
           
video_interface = gr.Interface(pipeline.deepfakes_video_predict,
                    gr.Video(),
                    "text",
                    examples = ["videos/celeb_synthesis.mp4", "videos/real-1.mp4"],
                    cache_examples = False
                    )


image_interface = gr.Interface(pipeline.deepfakes_image_predict,
                    gr.Image(),
                    "text",
                    examples = ["images/lady.jpg", "images/fake_image.jpg"],
                    cache_examples=False
                    )

audio_interface = gr.Interface(pipeline.deepfakes_audio_predict,
                               gr.Audio(),
                               "text",
                               examples = ["audios/DF_E_2000027.flac", "audios/DF_E_2000031.flac"],
                               cache_examples = False)


app = gr.TabbedInterface(interface_list= [image_interface, video_interface, audio_interface], 
                         tab_names = ['Image inference', 'Video inference', 'Audio inference'])

if __name__ == '__main__':
    app.launch(show_error=True)