High temperatures have a significant effect on increasing power usage especially in big cities where people are more likely to use air conditioning in their buildings and homes. It is necessary to estimate temperature fluctuations in a city to forecast power demand. In this paper, we use a machine learning approach to predict the temperature in Semarang city, Central Java, Indonesia. To forecast temperature data we utilize time series forecasting with a deep learning technique called Long Short Term Memory (LSTM) and Bidirectional LSTM (BiLSTM). For the data, we used temperature data from the ECWMF-ERA-5 and compare it with the measured temperature data at the Semarang City from the Indonesian Agency for Meteorology, Climatology, and Geophysics or BMKG. We investigate the performance of each model for forecasting temperature in terms of correlation coefficient and RMSE. The comparison of each model shows that the BiLSTM model performs better than the LSTM model.