We present a machine-learning-based model of relativistic electron fluxes >1.8 MeV using a neural network approach in the Earth's outer radiation belt. The Outer RadIation belt Electron Neural net model for Relativistic electrons (ORIENT-R) uses only solar wind conditions and geomagnetic indices as input. For the first time, we show that the state of the outer radiation belt can be determined using only solar wind conditions and geomagnetic indices, without any initial and boundary conditions. The most important features for determining outer radiation belt dynamics are found to be AL, solar wind flow speed and density, and SYM-H indices. ORIENT-R reproduces out-of-sample relativistic electron fluxes with a correlation coefficient of 0.95 and an uncertainty factor of ~2. ORIENT-R reproduces radiation belt dynamics during an out-of-sample geomagnetic storm with good agreement to the observations. In addition, ORIENT-R was run for a completely out-of-sample period between March 2018 and October 2019 when the AL index ended and was replaced with the predicted AL index (lasp.colorado.edu/~lix). It reproduces electron fluxes with a correlation coefficient of 0.92 and an out-of-sample uncertainty factor of ~3. Furthermore, ORIENT-R captured the trend in the electron fluxes from low-earth-orbit (LEO) SAMPEX, which is a completely out-of-sample dataset both temporally and spatially. In sum, the ORIENT-R model can reproduce transport, acceleration, decay, and dropouts of the outer radiation belt anywhere from short timescales (i.e., geomagnetic storms) and very long timescales (i.e., solar cycle) variations.