Predicting CO2 corrosion in fluid transmission pipelines is crucial for oil/gas company in upstream applications. This paper applies Light Gradient Boosting Machine (LightGBM) and Multiple Layer Perceptron Neural Network (MLPNN) models for the prediction of CO2 corrosion in aqueous pipelines with different pipe bending angles. To build the predictive models, a data set with total of 77,745 data points was generated parametrically by a computational fluid dynamics (CFD) model. Since different environmental conditions and geometries of the pipeline may cause non-uniform corrosion, a total of seven variables, including flow velocity, pH value, CO2 concentration, pipe inner diameter, pipe bend angle, radius and temperature are taken as the input features with the corrosion rate as the target variable. The CFD model was then used to compute the electrochemical processes occurring at the metal surfaces to predict the corrosion rate. Knowing that these features have nonlinear relationship with the target, tree based LightGBM, and neural network based MLPNN were chosen. LightGBM can control the overfitting issues, deal with comparative scales of the features and learn non-linear decision boundaries via boosting. The most significant findings are that these two types of machine learning (ML) algorithms have higher efficiency and can predict new results in microseconds in contrast to hours or even days using CFD. The R square of the LightGBM model is 0.9985, which is slightly higher than that of the MLPNN model at 0.9931. The k-fold cross validation results also show the stability of the two models. These ML models are 5 to 6 orders of magnitude faster than CFD models with similar accuracy therefore significantly saving time and cost. We further built a web application based on these predictive models as a tool for pipeline design and monitoring applications.