Building Sales Prediction Web Application using Machine Learning Dataset




Part 1: Generating the model

Sales Prediction Web Application : Dataset

Column values

    • Next, we run our trained model on test dataset to get model predictions and check model accuracy
      y_pred = model.predict(test_temp[features])
      from sklearn.metrics import mean_squared_error
      from math import sqrt
      rmse = sqrt(mean_squared_error(y_true, y_pred))
      #Output: 1.5555409360901584

Part 2: Creating backend API from model

Part 3: Deploying backend API to Heroku

Part 4: Creating a client-side app using react and bootstrap

  • We need to add files as per instructions provided by bootstrap docs in the index.html file as shown below:-
    <link href="%PUBLIC_URL%/logo192.png" />
    <link href="" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
    <div id="root"></div>
    <script src="" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>

This leaves us with the final step of the deployment of our web app online. So hold your patience and persistence a bit longer and let’s start off with the last step of our project.

Part 5: Deploying the client-side app to Netlify

Image for post

End Notes