machine learning and web service code