To apply the sobel opeartor to an image, compile the code, then call the operator with the 'sobel_operator()' function. Its parameters are the image path (image_path= ) and the image size (target_size= ). If you're working in an environment such as Spyder where you can set a working directory, the image path can be the file name (ie. 'image.jpg'), given you set the working directory to the folder containing the image you'd like to use. Otherwise, you'll have to use the raw image path.
If you'd like to learn about the sobel operator, the YouTube channel Computerphile has made a fantastic video on the subject -- https://www.youtube.com/watch?v=uihBwtPIBxM&t=283s