Old (bad) experimental script to do machine learning on webpage