Smart Manufacturing with AI: Predictive Maintenance to Smart Factories