Efficient Cloud-Based Ml-Approach For Safe Smart Cities