from ultralytics import YOLO import gradio as gr def perform_tracking(video_url): # Load the YOLO model model = YOLO("last.pt") # Perform object tracking on the video results = model.track(source=video_url, show=False, save=True) return results.xyxy iface = gr.Interface( fn=perform_tracking, inputs="text", outputs="video", title="Object Tracking", description="Perform object tracking on a video.", allow_flagging=False # Disable flagging feature ) iface.launch()