  The $T{\bar T}$ deformation of a relativistic two-dimensional theory results
in a solvable gravitational theory. Deformed scattering amplitudes can be
obtained from coupling the undeformed theory to the flat space
Jackiw--Teitelboim (JT) gravity. We show that the JT description is applicable
and useful also in finite volume. Namely, we calculate the torus partition
function of an arbitrary matter theory coupled to the JT gravity, formulated in
the first order (vierbein) formalism. The first order description provides a
natural set of dynamical clocks and rods for this theory, analogous to the
target space coordinates in string theory. These dynamical coordinates play the
role of relational observables allowing to define a torus path integral for the
JT gravity. The resulting partition function is one-loop exact and reproduces
the $T\bar{T}$ deformed finite volume spectrum.
