from ultralytics import YOLO # Load a modelmodel = YOLO('yolov8n-cls.pt') # load an official modelmodel = YOLO('path/to/best.pt') # load a custom model # Predict with the modelresults = model('https://ultralytics.com/images/bus.jpg') # predict on an image