Revolutionizing Factory Safety: How AI and IoT are Reducing Accidents in the Workplace