AI Predictive Maintenance for Factories: How It Works