Warped spherical compactifications in the gravity theory