The traffic is one of the major issues faced by people in almost every city. Predicting the traffic has always been very challenging for transportation planning as well as the city manager. The growth of population and usage of vehicles has increased the need for a reliable traffic prediction system. The system should reduce congestion, avoid accidents, and optimize the traffic flow that enhance road safety. The use of machine learning algorithms would be more suitable in handling the traffic and maintaining the flow of vehicles. The paper focuses on the work related to handling the traffic using machine learning principles such as LSTM and Random Forest (RF) algorithm. The advanced online dataset for traffic forecasts is used. The system is tested to have improved accuracy with the help of feature engineering. The basic dataset had the following fields: Vehicle Id, Time, Date, Junction Id are the primary and significant parameters considered to anticipate the traffic at each zone. With this we have added the day and weekend component to enhance our result.