SuriRaja's picture
Update app.py
72d54a5 verified
raw
history blame
561 Bytes
import gradio as gr
from utils import extract_frames
from model import predict_defect
def analyze_video(video):
frames = extract_frames(video.name)
results = [predict_defect(frame) for frame in frames]
return results
demo = gr.Interface(
fn=analyze_video,
inputs=gr.Video(label="Upload Drone Video"),
outputs=gr.Gallery(label="Detected Road Defects")
,
title="Drone-based Road Defect Detection",
description="Upload drone footage to identify and highlight road surface defects."
)
if __name__ == "__main__":
demo.launch()