guest_blog — Updated On August 16th, 2020
Advanced Machine Learning Project Python Regression Structured Data Supervised

Sales Prediction Web Application




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 rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
    <link rel="stylesheet" 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="[email protected]/dist/umd/popper.min.js" 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

About the Author


Saurabh Mhatre

I have worked as a frontend developer in the industry for the last 5 years. I have a part-time master’s degree in data science from GreyAtom and have been learning data science concepts for the last 2 years. In my spare time, I usually create side-projects, teach college students, and write technical articles.


3 thoughts on "Building Sales Prediction Web Application using Machine Learning Dataset"

Guna says: August 12, 2020 at 9:03 pm
Thank you Saurabh for such a great article!!!. It encourages me to build ML apps on my own. Reply
Nick says: June 24, 2023 at 1:15 pm
Getting a ModuleNotFoundError error for google. How do I runt this locally using Jupyter Notebook? Reply
Nick says: June 26, 2023 at 12:26 pm
Getting an error Cannot convert 'b'ps2'' to float when I call the API. What am I missing? Reply

Leave a Reply Your email address will not be published. Required fields are marked *