Crop the predicted object

hi there.
i trained a yolo model v8 through roboflow. the prediction is working quiet well but i want to know how can i crop the image in the bounded box.
they said you can use
result= model(prediction)
box= result.box
but it is not working

Hello! We have an example way to do this here GitHub - roboflow/roboflow-computer-vision-utilities: Interface with the Roboflow API and Python package for running inference (receiving predictions) and customizing result images from your Roboflow Train computer vision models.

This post also shows a way to crop Detecting and Reading QR Codes Using Computer Vision