import gradio as gr import pipeline custom_css = """ .gradio-container { max-width: 1400px !important; } """ image_interface = gr.Interface( fn=pipeline.deepfakes_image_predict, inputs=gr.Image(label="Upload Image", height=500), outputs=gr.Textbox(label="Detection Result", lines=8), title="Image Deepfake Detection" ) video_interface = gr.Interface( fn=pipeline.deepfakes_video_predict, inputs=gr.Video(label="Upload Video", height=500), outputs=gr.Textbox(label="Detection Result", lines=8), title="Video Deepfake Detection" ) app = gr.TabbedInterface( interface_list=[image_interface, video_interface], tab_names=['Image inference', 'Video inference'], css=custom_css ) if __name__ == "__main__": app.launch()