Running the code of Detection object with kangaroo using Spyder( Anaconda 3)

The codes are ready in the link below I just want to run it in python files>> (Spyder( Anaconda 3))

Detection object with kangaroo using Spyder( Anaconda 3)

https://machinelearningmastery.com/how-to-train-an-object-detection-model-with-keras/
https://machinelearningmastery.com/how-to-perform-object-detection-with-yolov3-in-keras/