Diffuse gamma emission of the Galaxy from cosmic rays