Spaces:
Sleeping
Sleeping
File size: 802 Bytes
0fb6b8d |
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 |
import gradio as gr
from utils.inference_router import process_video
parameters = [
"Bridges", "Encroachment", "Structure Progress",
"Potholes", "Crack", "Unauthorized Median Opening",
"Crash Barriers", "Entry/Exit of Highway", "Drain",
"Tree Height", "Latitude", "VARI"
]
def detect(video, selected_params):
return process_video(video, selected_params)
with gr.Blocks() as app:
gr.Markdown("## 🛣️ AI Road Surveillance Analyzer")
video_input = gr.Video(label="Upload Surveillance Video")
param_input = gr.CheckboxGroup(choices=parameters, label="Select Parameters")
btn = gr.Button("Run Detection")
output_gallery = gr.Gallery(label="Detection Results")
btn.click(fn=detect, inputs=[video_input, param_input], outputs=output_gallery)
app.launch()
|