With the increasing demand for location-based services, indoor localization has attracted great interest. In this paper, we present DeepML, a deep long short-term memory (LSTM) based system for indoor localization using magnetic and light sensors on smartphones. We experimentally verify the feasibility of using bimodal data from magnetic and light sensors for indoor localization for closed environments where there is no ambient light. We then design the DeepML system, which first builds bimodal images by data preprocessing, and then trains a deep LSTM network in the offline phase. Newly received magnetic field and light data are then exploited for estimating the location of the mobile device using a probabilistic method. The extensive experiments verify the effectiveness of the proposed DeepML system.