Updated the python model to use a sliding window.