In this paper, an application of an artificial neural network algorithm is proposed to enhance the accuracy of temperature measurement using a fiber-optic sensor based on a Fabry–Perot interferometer (FPI). It is assumed that the interrogation of the FPI is carried out using an optical comb generator realizing a microwave photonic approach. Firstly, modelling of the reflection spectrum of a Fabry–Perot interferometer is implemented. Secondly, probing of the obtained spectrum using a comb-generator model is performed. The resulting electrical signal of the photodetector is processed and is used to create a sample for artificial neural network training aimed at temperature detection. It is demonstrated that the artificial neural network implementation can predict temperature variations with an accuracy equal to 0.018 °C in the range from −10 to +10 °C and 0.147 in the range from −15 to +15 °C.