An approach for smart city applications using artificial intelligence