emctMonitor / app.py
CYMBIOT's picture
Update app.py
2d4acdf verified
raw
history blame contribute delete
520 Bytes
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()