#!/usr/bin/env python # Example usage for tennis-detection-yolov11 from ultralytics import YOLO # Load model from local file model = YOLO('model.pt') # Or download from Hugging Face (after upload) # model = YOLO('hf://YOUR_USERNAME/tennis-detection-yolov11/model.pt') # Predict on image results = model.predict('image.jpg', conf=0.3) results[0].show() # Predict on video results = model.predict('video.mp4', conf=0.3, save=True)