Spaces:
Runtime error
Runtime error
File size: 1,285 Bytes
b6d5990 afc5bc1 b6d5990 |
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 inference_2 as inference
title="Multimodal deepfake detector"
description="Deepfake detection for videos, images and audio modalities."
video_interface = gr.Interface(inference.deepfakes_video_predict,
gr.Video(),
"text",
examples = ["videos/celeb_synthesis.mp4", "videos/real-1.mp4"],
cache_examples = False
)
image_interface = gr.Interface(inference.deepfakes_image_predict,
gr.Image(),
"text",
examples = ["images/lady.jpg", "images/fake_image.jpg"],
cache_examples=False
)
audio_interface = gr.Interface(inference.deepfakes_spec_predict,
gr.Audio(),
"text",
examples = ["audios/DF_E_2000027.flac", "audios/DF_E_2000031.flac"],
cache_examples = False)
app = gr.TabbedInterface(interface_list= [video_interface, audio_interface,image_interface],
tab_names = ['Video inference', 'Audio inference', 'Image inference'])
if __name__ == '__main__':
app.launch(share = False) |