Incorporating astrochemistry into molecular line modelling via emulation