surabhic's picture
Update app.py
acfe633 verified
import gradio as gr
from reid_processor import process_reid_video
import os
# Define the Gradio interface
iface = gr.Interface(
fn=process_reid_video,
inputs=gr.Video(label="Upload a 15-second football video (e.g., 720p"),
outputs=[
gr.Video(
label="Processed Video with Re-identified Players",
format="mp4" # Explicitly set the output format
)
],
title="Football Player Re-identification in a Single Feed",
description=(
"Upload a 15-second football video (e.g., 720p). "
"This application uses a fine-tuned YOLOv11 model to detect players and then "
"tracks them, ensuring consistent IDs even if players temporarily leave and re-enter the frame. "
"The output video will show players boxed with their unique, persistent IDs."
),
examples=[],
allow_flagging="auto",
live=False
)
# Launch with API docs disabled if needed
if __name__ == "__main__":
print("Launching Gradio app...")
iface.launch(show_api=False) # Temporarily disable API docs