  Neutrinos propagating in a dense neutrino gas, such as those expected in
core-collapse supernovae (CCSNe) and neutron star mergers (NSMs), can
experience fast flavor conversions on relatively short scales. This can happen
if the neutrino electron lepton number ($\nu$ELN) angular distribution crosses
zero in a certain direction. Despite this, most of the state-of-the-art CCSN
and NSM simulations do not provide such detailed angular information and
instead, supply only a few moments of the neutrino angular distributions. In
this study we employ, for the \emph{first} time, a machine learning (ML)
approach to this problem and show that it can be extremely successful in
detecting $\nu$ELN crossings on the basis of its zeroth and first moments. We
observe that an accuracy of $\sim95\%$ can be achieved by the ML algorithms,
which almost corresponds to the Bayes error rate of our problem. Considering
its remarkable efficiency and agility, the ML approach provides one with an
unprecedented opportunity to evaluate the occurrence of FFCs in CCSN and NSM
simulations \emph{on the fly}. We also provide our ML methodologies on GitHub.
