Both the fields are different and require you to pick up different set of tools and skills. Machine learning requires you to have some math background plus coding plus understanding of some popular ML techniques whereas web development is mostly software development.
Read more