demo / app.py
ybbwcwaps
Add FakeVideoDetect
e8e478e
raw
history blame
No virus
364 Bytes
import gradio as gr
from run import detect_video
def greet(video):
print(video, type(video))
pred = detect_video(video_path=video)
if pred > 0.5:
string = f"Fake: {pred*100:.2f}%"
else:
string = f"Real: {(1-pred)*100:.2f}%"
return string
demo = gr.Interface(fn=greet, inputs=gr.Video(), outputs="text")
demo.launch(share=True)