Gravitational path integral from the T2 deformation