# Define the model for feature extraction def create_vgg16_model(): model = VGG16(weights='imagenet', include_top=False, pooling='avg') return model