Implementing the training script for the cat detection model