  The gamma-ray burst (GRB) afterglows provide an unique opportunity to study
the interstellar medium (ISM) of star-forming galaxies at high-redshift. The
GRB-DLAs (damped Lyman-$\alpha$ absorbers) contain a large neutral hydrogen
column density, N(H I), and are observed against the GRB afterglow. A large
fraction of GRB-DLAs show presence of molecular hydrogen (H$_2$) which is an
indicator of star-formation. Hence it is important to study those GRB-DLAs
which have H$_2$ lines to decipher and understand their physical conditions.
The GRB-DLAs 121024A and 120815A, situated at redshift 2.30 and 2.36
respectively, are two such important H$_2$-bearing GRB-DLAs. Besides H$_2$,
these two GRB-DLAs also show many metal lines. In this work we have carried out
a detail numerical study on the H$_2$ lines, as well as on those metal lines,
in GRB-DLAs 121024A and 120815A self-consistently. We use the spectral
synthesis code CLOUDY for this study. This modeling helps us to determine the
underlying physical conditions which give rise such lines and hence to
understand these two GRB-DLAs in much more detail than any other previous
investigation. We find that the hydrogen densities for these two H$_2$-bearing
DLAs are $\geq$ 60 cm$^{-3}$. Moreover our study infers that the linear sizes
are $\leq 17.7$ pc for these two GRB-DLAs, and the mean gas temperatures
averaged over the cloud thickness, are $\leq$ 140 K.
