The design of commercial air transportation vehicles heavily relies on understanding and modeling fluid flows, which pose computational challenges due to their complexity and high degrees of freedom. To overcome these challenges, we propose a novel approach based on machine learning (ML) to construct reduced-order models (ROMs) using an autoencoder neural network coupled with a discrete empirical interpolation method (DEIM). This methodology combines the interpolation of nonlinear functions identified based on selected interpolation points using DEIM with an ML-based clustering algorithm that provides accurate predictions by spanning a low-dimensional subspace at a significantly lower computational cost. In this study, we demonstrate the effectiveness of our approach by the calculation of transonic flows over the National Advisory Committee of Aeronautics 0012 airfoil and the National Aeronautics and Space Administration Common Research Model wing. All the results confirm that the ROM captures high-dimensional parameter variations efficiently and accurately in transonic regimes, in which the nonlinearities are induced by shock waves, demonstrating the feasibility of the ROM for nonlinear aerodynamics problems with varying flow conditions.