Download alll the files on the same folder. Due to size issues i cant attach the pre trained model here so I am enclosing a trainer.py file and demo.py file download the dataset from the link below:
https://www.kaggle.com/datasets/arunrk7/surface-crack-detection
use this data to train and test the model have fun