Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import inference_2 as inference
|
3 |
+
|
4 |
+
|
5 |
+
title="DEEPDETECT"
|
6 |
+
description="Deepfake detection"
|
7 |
+
|
8 |
+
|
9 |
+
video_inf = gr.Interface(inference.df_video_pred,
|
10 |
+
gr.Video(),
|
11 |
+
"text",
|
12 |
+
cache_examples = False
|
13 |
+
)
|
14 |
+
|
15 |
+
|
16 |
+
image_inf = gr.Interface(inference.df_img_pred,
|
17 |
+
gr.Image(),
|
18 |
+
"text",
|
19 |
+
cache_examples=False
|
20 |
+
)
|
21 |
+
|
22 |
+
|
23 |
+
app = gr.TabbedInterface(interface_list= [image_inf, video_inf],
|
24 |
+
tab_names = ['Image inference', 'Video inference'])
|
25 |
+
|
26 |
+
if __name__ == '__main__':
|
27 |
+
app.launch(share = True)
|