First version with ML prediction code