title
Tutorial 2- Deployment of ML models in Heroku using FLASK

description
Hello All, In this video we will see how we can deploy ML models is Heroku using Flask. github url :https://github.com/krishnaik06/Heroku-Demo #HEROKUDEPLOYMENT Support me in Patreon: https://www.patreon.com/join/2340909? You can buy my book on Finance with Machine Learning and Deep Learning from the below url amazon url: https://www.amazon.in/Hands-Python-Finance-implementing-strategies/dp/1789346371/ref=as_sl_pc_qf_sp_asin_til?tag=krishnaik06-21&linkCode=w00&linkId=ac229c9a45954acc19c1b2fa2ca96e23&creativeASIN=1789346371 Buy the Best book of Machine Learning, Deep Learning with python sklearn and tensorflow from below amazon url: https://www.amazon.in/Hands-Machine-Learning-Scikit-Learn-Tensor/dp/9352135210/ref=as_sl_pc_qf_sp_asin_til?tag=krishnaik06-21&linkCode=w00&linkId=a706a13cecffd115aef76f33a760e197&creativeASIN=9352135210 Connect with me here: Twitter: https://twitter.com/Krishnaik06 Facebook: https://www.facebook.com/krishnaik06 instagram: https://www.instagram.com/krishnaik06 Subscribe my unboxing Channel https://www.youtube.com/channel/UCjWY5hREA6FFYrthD0rZNIw Below are the various playlist created on ML,Data Science and Deep Learning. Please subscribe and support the channel. Happy Learning! Deep Learning Playlist: https://www.youtube.com/watch?v=DKSZHN7jftI&list=PLZoTAELRMXVPGU70ZGsckrMdr0FteeRUi Data Science Projects playlist: https://www.youtube.com/watch?v=5Txi0nHIe0o&list=PLZoTAELRMXVNUcr7osiU7CCm8hcaqSzGw NLP playlist: https://www.youtube.com/watch?v=6ZVf1jnEKGI&list=PLZoTAELRMXVMdJ5sqbCK2LiM0HhQVWNzm Statistics Playlist: https://www.youtube.com/watch?v=GGZfVeZs_v4&list=PLZoTAELRMXVMhVyr3Ri9IQ-t5QPBtxzJO Feature Engineering playlist: https://www.youtube.com/watch?v=NgoLMsaZ4HU&list=PLZoTAELRMXVPwYGE2PXD3x0bfKnR0cJjN Computer Vision playlist: https://www.youtube.com/watch?v=mT34_yu5pbg&list=PLZoTAELRMXVOIBRx0andphYJ7iakSg3Lk Data Science Interview Question playlist: https://www.youtube.com/watch?v=820Qr4BH0YM&list=PLZoTAELRMXVPkl7oRvzyNnyj1HS4wt2K- You can buy my book on Finance with Machine Learning and Deep Learning from the below url amazon url: https://www.amazon.in/Hands-Python-Finance-implementing-strategies/dp/1789346371/ref=sr_1_1?keywords=krish+naik&qid=1560943725&s=gateway&sr=8-1 🙏🙏🙏🙏🙏🙏🙏🙏 YOU JUST NEED TO DO 3 THINGS to support my channel LIKE SHARE & SUBSCRIBE TO MY YOUTUBE CHANNEL

detail
{'title': 'Tutorial 2- Deployment of ML models in Heroku using FLASK', 'heatmap': [{'end': 426.237, 'start': 393.422, 'weight': 0.717}, {'end': 621.064, 'start': 562.9, 'weight': 0.724}, {'end': 750.936, 'start': 703.737, 'weight': 0.868}, {'end': 808.87, 'start': 780.936, 'weight': 0.733}, {'end': 961.046, 'start': 897.506, 'weight': 1}, {'end': 1001.224, 'start': 971.474, 'weight': 0.745}, {'end': 1028.657, 'start': 1014.727, 'weight': 0.717}, {'end': 1129.305, 'start': 1099.187, 'weight': 0.745}], 'summary': 'Tutorial covers deploying machine learning models using flask into heroku, creating a web app with fields for experience, test score, and interview score, and developing a salary prediction api. it also explains feature engineering, creating a pickle file, deploying python code to heroku, and manual deployment of a template folder in a github repository.', 'chapters': [{'end': 227.379, 'segs': [{'end': 29.355, 'src': 'embed', 'start': 1.513, 'weight': 0, 'content': [{'end': 4.776, 'text': 'hello all my name is krishnak and welcome to my youtube channel.', 'start': 1.513, 'duration': 3.263}, {'end': 12.262, 'text': 'today we are going to start the tutorial 2 of deployment of machine learning models using flask into heroku.', 'start': 4.776, 'duration': 7.486}, {'end': 15.344, 'text': 'now heroku is basically a platform as a service.', 'start': 12.262, 'duration': 3.082}, {'end': 23.711, 'text': 'in my first tutorial, i have already discussed about heroku and i have explained you what exactly is actually a platform as a service, uh,', 'start': 15.344, 'duration': 8.367}, {'end': 29.355, 'text': 'which is basically provided by many companies and currently what tool we are basically going to explore.', 'start': 23.711, 'duration': 5.644}], 'summary': 'Krishnak introduces tutorial 2 on deploying ml models using flask into heroku, a platform as a service.', 'duration': 27.842, 'max_score': 1.513, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o1513.jpg'}, {'end': 63.808, 'src': 'embed', 'start': 40.68, 'weight': 1, 'content': [{'end': 47.843, 'text': "so first of all, we'll train one of the application, one of the use case, and we'll try to create a model.", 'start': 40.68, 'duration': 7.163}, {'end': 52.285, 'text': "after that, when we save that particular model, we'll create a web app using flask framework.", 'start': 47.843, 'duration': 4.442}, {'end': 58.487, 'text': 'Now Flask Frameworks helps us in creating micro web services.', 'start': 53.325, 'duration': 5.162}, {'end': 63.808, 'text': "And what we'll do is that after creating this web app, we will commit the code in the GitHub.", 'start': 59.027, 'duration': 4.781}], 'summary': 'Train a model on a use case, create web app using flask, and commit code to github.', 'duration': 23.128, 'max_score': 40.68, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o40680.jpg'}, {'end': 151.255, 'src': 'embed', 'start': 124.872, 'weight': 2, 'content': [{'end': 130.116, 'text': 'Now this particular URL, you can also access, anybody can access throughout this particular world.', 'start': 124.872, 'duration': 5.244}, {'end': 133.619, 'text': 'Heroku is basically free platform just for one user.', 'start': 130.515, 'duration': 3.104}, {'end': 140.745, 'text': 'Okay And it will basically give you the URL, something like this, which will have the extension as herokuapp.com.', 'start': 134.259, 'duration': 6.486}, {'end': 143.568, 'text': 'Now in this, you will be able to see that there are three fields.', 'start': 141.286, 'duration': 2.282}, {'end': 145.83, 'text': 'One is experience, test score and interview score.', 'start': 143.668, 'duration': 2.162}, {'end': 151.255, 'text': 'In experience, if you give your experience as 12 years, your test score will be between zero to 10.', 'start': 146.331, 'duration': 4.924}], 'summary': 'Heroku provides free access to a url for one user, with fields for experience, test score, and interview score.', 'duration': 26.383, 'max_score': 124.872, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o124872.jpg'}, {'end': 193.411, 'src': 'embed', 'start': 166.606, 'weight': 3, 'content': [{'end': 170.429, 'text': "okay, so we'll create a salary prediction API and, And in short,", 'start': 166.606, 'duration': 3.823}, {'end': 178.702, 'text': "you can see that I'm having this particular output saying that employee salary should be this many dollars with respect to my model that I have basically trained.", 'start': 170.429, 'duration': 8.273}, {'end': 181.506, 'text': 'Okay Now let us begin the steps.', 'start': 178.962, 'duration': 2.544}, {'end': 184.73, 'text': "First of all, I'll go and create my model for creating the model.", 'start': 181.586, 'duration': 3.144}, {'end': 189.126, 'text': 'So here is the complete file explorer that I basically have.', 'start': 185.762, 'duration': 3.364}, {'end': 193.411, 'text': "Okay So first of all, I'm going to create this model.py file.", 'start': 189.747, 'duration': 3.664}], 'summary': 'Creating a salary prediction api with a model trained to predict employee salaries.', 'duration': 26.805, 'max_score': 166.606, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o166606.jpg'}, {'end': 236.049, 'src': 'embed', 'start': 208.203, 'weight': 5, 'content': [{'end': 211.626, 'text': 'Now the best thing about this particular use case, this is just a small use case guys.', 'start': 208.203, 'duration': 3.423}, {'end': 214.228, 'text': 'I want to show you a simple model deployment.', 'start': 212.047, 'duration': 2.181}, {'end': 221.794, 'text': "Later on in the upcoming videos, I'll take more complex problem statement from Kaggle and try to deploy it, execute it over here,", 'start': 214.669, 'duration': 7.125}, {'end': 227.379, 'text': "train my model and then deploy that model into Heroku and I'll definitely show you each and every process over here.", 'start': 221.794, 'duration': 5.585}, {'end': 232.428, 'text': 'Now in this particular data set I have experience, test score, interview score.', 'start': 227.847, 'duration': 4.581}, {'end': 233.888, 'text': 'These are all my independent feature.', 'start': 232.488, 'duration': 1.4}, {'end': 236.049, 'text': 'Salary is basically my dependent feature.', 'start': 234.388, 'duration': 1.661}], 'summary': 'Demonstrating simple model deployment for small use case with specific features and plan for future complex deployment', 'duration': 27.846, 'max_score': 208.203, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o208203.jpg'}], 'start': 1.513, 'title': 'Deploying machine learning models with flask and heroku', 'summary': 'Covers deploying machine learning models using flask into heroku, outlining the process and resulting in a web app accessible via a heroku url with three fields: experience, test score, and interview score. it also discusses creating a salary prediction api using a model trained on a 12-year experience dataset to predict employee salaries.', 'chapters': [{'end': 40.68, 'start': 1.513, 'title': 'Deployment of machine learning models using flask into heroku', 'summary': 'Discusses the tutorial 2 of deployment of machine learning models using flask into heroku, a platform as a service, highlighting the basic steps required for deployment.', 'duration': 39.167, 'highlights': ['The tutorial focuses on the deployment of machine learning models using Flask into Heroku, a platform as a service.', 'Heroku is a platform as a service that is being explored in the tutorial.', 'The basic steps required for deploying machine learning or deep learning models are emphasized.']}, {'end': 145.83, 'start': 40.68, 'title': 'Deploying machine learning model with flask and heroku', 'summary': 'Outlines the process of training a model, creating a web app using flask, committing the code to github, linking the github repository to heroku, and deploying the model, resulting in a web app accessible via a heroku url with three fields: experience, test score, and interview score.', 'duration': 105.15, 'highlights': ['The chapter outlines the process of training a model, creating a web app using Flask, committing the code to GitHub, linking the GitHub repository to Heroku, and deploying the model. The process involves training a model, creating a web app using Flask, committing the code to GitHub, linking the GitHub repository to Heroku, and deploying the model.', 'The web app is accessible via a Heroku URL with three fields: experience, test score, and interview score. The deployed web app is accessible via a Heroku URL and contains three fields: experience, test score, and interview score.', "Heroku is a free platform for one user and provides a URL with the extension 'herokuapp.com'. Heroku is a free platform for one user and provides a URL with the extension 'herokuapp.com'."]}, {'end': 227.379, 'start': 146.331, 'title': 'Salary prediction model deployment', 'summary': 'Demonstrates creating a salary prediction api using a model trained on a 12-year experience dataset to predict employee salaries, and plans to deploy more complex problem statements from kaggle in the future.', 'duration': 81.048, 'highlights': ['The chapter demonstrates creating a salary prediction API The chapter focuses on creating an API for predicting salaries.', 'Model trained on a 12-year experience dataset to predict employee salaries A 12-year experience dataset is used to train the model for predicting employee salaries.', 'Plans to deploy more complex problem statements from Kaggle in the future Future plans include deploying more complex problem statements from Kaggle for model deployment.']}], 'duration': 225.866, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o1513.jpg', 'highlights': ['The tutorial focuses on the deployment of machine learning models using Flask into Heroku, a platform as a service.', 'The chapter outlines the process of training a model, creating a web app using Flask, committing the code to GitHub, linking the GitHub repository to Heroku, and deploying the model.', 'The web app is accessible via a Heroku URL with three fields: experience, test score, and interview score.', 'The chapter demonstrates creating a salary prediction API.', 'Model trained on a 12-year experience dataset to predict employee salaries.', 'Plans to deploy more complex problem statements from Kaggle in the future.']}, {'end': 695.375, 'segs': [{'end': 265.423, 'src': 'embed', 'start': 227.847, 'weight': 0, 'content': [{'end': 232.428, 'text': 'Now in this particular data set I have experience, test score, interview score.', 'start': 227.847, 'duration': 4.581}, {'end': 233.888, 'text': 'These are all my independent feature.', 'start': 232.488, 'duration': 1.4}, {'end': 236.049, 'text': 'Salary is basically my dependent feature.', 'start': 234.388, 'duration': 1.661}, {'end': 243.05, 'text': 'Here I have basically, if the person is having five years of experience, if he has got test score as six, which is out of 10,', 'start': 236.709, 'duration': 6.341}, {'end': 246.931, 'text': 'and interview score is seven, then what is the salary that he should get offered?', 'start': 243.05, 'duration': 3.881}, {'end': 250.492, 'text': 'So these are just some data set that I have only created,', 'start': 246.991, 'duration': 3.501}, {'end': 255.313, 'text': "and I've also given some NAN values so that I show you what type of feature engineering I have basically done.", 'start': 250.492, 'duration': 4.821}, {'end': 263.342, 'text': "So what I'm going to do is that I'm going to replace all the nan values in experience with zero, because if I'm having nan values,", 'start': 256.297, 'duration': 7.045}, {'end': 265.423, 'text': "I'm basically considering that person is a fresher.", 'start': 263.342, 'duration': 2.081}], 'summary': 'Data set includes experience, test score, interview score as independent features, salary as dependent feature. performing feature engineering and replacing nan values with zero for experience.', 'duration': 37.576, 'max_score': 227.847, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o227847.jpg'}, {'end': 338.212, 'src': 'embed', 'start': 309.989, 'weight': 2, 'content': [{'end': 311.851, 'text': 'Salary is basically my dependent feature.', 'start': 309.989, 'duration': 1.862}, {'end': 315.113, 'text': 'So I need to predict, I need to create a model which will be predicting the salary.', 'start': 311.891, 'duration': 3.222}, {'end': 318.756, 'text': "So after this, I'm just going to.", 'start': 316.314, 'duration': 2.442}, {'end': 321.418, 'text': 'since you can see, my first feature is basically experience.', 'start': 318.756, 'duration': 2.662}, {'end': 324.721, 'text': 'you have 5, 2, 7, 3, 10, 11, right?', 'start': 321.418, 'duration': 3.303}, {'end': 325.782, 'text': 'These are not in integers.', 'start': 324.761, 'duration': 1.021}, {'end': 329.825, 'text': "So I'll try to create a function which will convert the word into integers.", 'start': 326.182, 'duration': 3.643}, {'end': 332.427, 'text': 'So this is what is the function that I have done.', 'start': 330.245, 'duration': 2.182}, {'end': 338.212, 'text': "And I'm going to apply this into my experience feature column, okay? By using lambda function.", 'start': 333.027, 'duration': 5.185}], 'summary': 'Creating a model to predict salary based on experience data.', 'duration': 28.223, 'max_score': 309.989, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o309989.jpg'}, {'end': 426.237, 'src': 'heatmap', 'start': 375.812, 'weight': 3, 'content': [{'end': 380.095, 'text': "you'll go and see that one file is basically created like which is basically called as model dot pkl.", 'start': 375.812, 'duration': 4.283}, {'end': 385.92, 'text': 'Now this particular file, I have to deploy it in the Heroku environment, which is platform as a service.', 'start': 380.535, 'duration': 5.385}, {'end': 388, 'text': 'okay. so this is my first step.', 'start': 386.42, 'duration': 1.58}, {'end': 388.841, 'text': 'okay, i have.', 'start': 388, 'duration': 0.841}, {'end': 391.161, 'text': "i've created a small um.", 'start': 388.841, 'duration': 2.32}, {'end': 393.422, 'text': "uh, you know, i i've basically taken a use case.", 'start': 391.161, 'duration': 2.261}, {'end': 396.602, 'text': "i've usually used this particular model.py file.", 'start': 393.422, 'duration': 3.18}, {'end': 401.084, 'text': "i've created a pickle file called as model.pkl, once this model file is created.", 'start': 396.602, 'duration': 4.482}, {'end': 403.324, 'text': 'now the next thing from my steps.', 'start': 401.084, 'duration': 2.24}, {'end': 405.385, 'text': 'right, i have done this.', 'start': 403.324, 'duration': 2.061}, {'end': 407.005, 'text': 'this i have basically done.', 'start': 405.385, 'duration': 1.62}, {'end': 410.606, 'text': 'okay. now, the next step is that i will create the web app using flask.', 'start': 407.005, 'duration': 3.601}, {'end': 412.647, 'text': 'Now for creating the web app.', 'start': 411.286, 'duration': 1.361}, {'end': 415.209, 'text': 'you just go and click on this app.py file.', 'start': 412.647, 'duration': 2.562}, {'end': 417.21, 'text': 'This is pretty much simple.', 'start': 415.969, 'duration': 1.241}, {'end': 420.273, 'text': "Um, you don't have to learn.", 'start': 417.23, 'duration': 3.043}, {'end': 426.237, 'text': 'Basically, you have to learn this properly, because whenever you want to deploy a file, try to use, uh,', 'start': 420.733, 'duration': 5.504}], 'summary': 'A model.pkl file was created and will be deployed on heroku as a web app using flask.', 'duration': 44.461, 'max_score': 375.812, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o375812.jpg'}, {'end': 478.946, 'src': 'embed', 'start': 454.155, 'weight': 5, 'content': [{'end': 460.377, 'text': "so what i'll do is that in app.py, the first thing is that you have to import numpy, flask and pickle.", 'start': 454.155, 'duration': 6.222}, {'end': 462.118, 'text': 'okay, because why we did require pickle?', 'start': 460.377, 'duration': 1.741}, {'end': 464.599, 'text': 'because we need to read this pickle file right.', 'start': 462.118, 'duration': 2.481}, {'end': 466.519, 'text': 'this is my model.pkl file.', 'start': 464.599, 'duration': 1.92}, {'end': 469.1, 'text': 'okay, so this particular pickle file i need to read it.', 'start': 466.519, 'duration': 2.581}, {'end': 474.002, 'text': 'so for that First step is that I will go and create my Flask app.', 'start': 469.1, 'duration': 4.902}, {'end': 478.946, 'text': "And for that, I'm using this library, which is called as Flask, which is present inside Flask.", 'start': 474.883, 'duration': 4.063}], 'summary': 'In app.py, import numpy, flask, and pickle to read model.pkl for creating a flask app.', 'duration': 24.791, 'max_score': 454.155, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o454155.jpg'}, {'end': 621.064, 'src': 'heatmap', 'start': 562.9, 'weight': 0.724, 'content': [{'end': 569.445, 'text': "after finding the output, I'll again render index dot HTML, but I will give some data which will my prediction text.", 'start': 562.9, 'duration': 6.545}, {'end': 573.88, 'text': 'okay, this prediction text will get replaced over here, Okay.', 'start': 569.445, 'duration': 4.435}, {'end': 576.561, 'text': 'It will get replaced over here inside this particular braces.', 'start': 574.1, 'duration': 2.461}, {'end': 579.763, 'text': 'Now that is what a simple flask framework is.', 'start': 577.162, 'duration': 2.601}, {'end': 583.125, 'text': "And finally I'll have a main function which will run this whole flask.", 'start': 579.903, 'duration': 3.222}, {'end': 585.886, 'text': 'Okay Which will run this complete flask.', 'start': 583.825, 'duration': 2.061}, {'end': 594.51, 'text': 'Now, if you want to see how this will run in the local environment, you just copy the path of this go to your command prompt.', 'start': 586.346, 'duration': 8.164}, {'end': 597.48, 'text': 'okay or sorry?', 'start': 595.819, 'duration': 1.661}, {'end': 600.862, 'text': 'go to your anaconda command prompt or whichever prompt.', 'start': 597.48, 'duration': 3.382}, {'end': 604.245, 'text': "if you're going to a command prompt, that basically means you have installed python manually.", 'start': 600.862, 'duration': 3.383}, {'end': 605.746, 'text': 'go to your anaconda prompt.', 'start': 604.245, 'duration': 1.501}, {'end': 609.508, 'text': 'change your directory to that path where your code is.', 'start': 605.746, 'duration': 3.762}, {'end': 610.409, 'text': 'write python.', 'start': 609.508, 'duration': 0.901}, {'end': 612.901, 'text': 'Either you can write Python three or Python.', 'start': 611.26, 'duration': 1.641}, {'end': 616.802, 'text': "Okay I'm writing Python and just write app.py.", 'start': 613.321, 'duration': 3.481}, {'end': 621.064, 'text': 'So as soon as you write this app.py, this whole flask framework will start running.', 'start': 616.942, 'duration': 4.122}], 'summary': 'Using flask framework, running main function will start the flask framework in local environment.', 'duration': 58.164, 'max_score': 562.9, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o562900.jpg'}, {'end': 604.245, 'src': 'embed', 'start': 574.1, 'weight': 6, 'content': [{'end': 576.561, 'text': 'It will get replaced over here inside this particular braces.', 'start': 574.1, 'duration': 2.461}, {'end': 579.763, 'text': 'Now that is what a simple flask framework is.', 'start': 577.162, 'duration': 2.601}, {'end': 583.125, 'text': "And finally I'll have a main function which will run this whole flask.", 'start': 579.903, 'duration': 3.222}, {'end': 585.886, 'text': 'Okay Which will run this complete flask.', 'start': 583.825, 'duration': 2.061}, {'end': 594.51, 'text': 'Now, if you want to see how this will run in the local environment, you just copy the path of this go to your command prompt.', 'start': 586.346, 'duration': 8.164}, {'end': 597.48, 'text': 'okay or sorry?', 'start': 595.819, 'duration': 1.661}, {'end': 600.862, 'text': 'go to your anaconda command prompt or whichever prompt.', 'start': 597.48, 'duration': 3.382}, {'end': 604.245, 'text': "if you're going to a command prompt, that basically means you have installed python manually.", 'start': 600.862, 'duration': 3.383}], 'summary': 'Introduction to using flask framework for running a python application locally.', 'duration': 30.145, 'max_score': 574.1, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o574100.jpg'}], 'start': 227.847, 'title': 'Feature engineering and model deployment', 'summary': 'Explains feature engineering for salary prediction with independent features like experience, test score, and interview score. it also covers deploying a machine learning model using flask, creating a pickle file, developing a web app with flask, and running the flask framework locally.', 'chapters': [{'end': 352.361, 'start': 227.847, 'title': 'Feature engineering for salary prediction', 'summary': 'Explains feature engineering for predicting salaries using independent features like experience, test score, and interview score. it includes replacing nan values, creating independent and dependent features, and applying a linear regression model for salary prediction.', 'duration': 124.514, 'highlights': ['Applying feature engineering to replace NAN values in the experience and test score features with 0 and the mean of the column respectively. The speaker demonstrates feature engineering by replacing NAN values in the experience and test score features with 0 and the mean of the column, showcasing the application of data manipulation techniques in the dataset.', 'Creating independent features, such as experience, test score, and interview score, to predict the dependent feature, salary, and applying a function to convert non-integer values into integers. The chapter emphasizes creating independent features like experience, test score, and interview score to predict the dependent feature, salary, and showcases the creation of a function to convert non-integer values into integers.', 'Utilizing a simple linear regression model to fit the data for predicting salaries based on the independent features. The speaker demonstrates the application of a simple linear regression model to predict salaries based on the independent features, highlighting the use of machine learning techniques for salary prediction.']}, {'end': 695.375, 'start': 352.781, 'title': 'Deploying model using flask', 'summary': 'Covers the process of deploying a machine learning model using flask, including creating a pickle file, developing a web app with flask, and running the flask framework locally.', 'duration': 342.594, 'highlights': ['The process of deploying a machine learning model using Flask involves creating a pickle file, developing a web app with Flask, and running the Flask framework locally. The entire process of deploying a machine learning model using Flask, including creating a pickle file, developing a web app with Flask, and running the Flask framework locally, is covered.', 'Using pickle to dump the model results in a file called model.pkl, which needs to be deployed in the Heroku environment. Using pickle to dump the model results in a file called model.pkl, which needs to be deployed in the Heroku environment, a platform as a service.', 'Creating a web app with Flask involves importing numpy, flask, and pickle, and creating a predict function to take inputs and produce outputs. Creating a web app with Flask involves importing numpy, flask, and pickle, and creating a predict function to take inputs and produce outputs.', 'Running the Flask framework locally requires changing the directory to where the code is stored and executing the app.py file using Python. Running the Flask framework locally requires changing the directory to where the code is stored and executing the app.py file using Python.']}], 'duration': 467.528, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o227847.jpg', 'highlights': ['Creating independent features like experience, test score, and interview score to predict salary.', 'Applying feature engineering to replace NAN values in the experience and test score features.', 'Utilizing a simple linear regression model to fit the data for predicting salaries.', 'The process of deploying a machine learning model using Flask involves creating a pickle file.', 'Using pickle to dump the model results in a file called model.pkl, which needs to be deployed in the Heroku environment.', 'Creating a web app with Flask involves importing numpy, flask, and pickle.', 'Running the Flask framework locally requires changing the directory to where the code is stored.']}, {'end': 953.08, 'segs': [{'end': 764.03, 'src': 'heatmap', 'start': 703.737, 'weight': 1, 'content': [{'end': 707.438, 'text': "Right? So we'll try to deploy the same solution into something else.", 'start': 703.737, 'duration': 3.701}, {'end': 712.419, 'text': "Okay So for that, what I'll do is that first of all, I'll go and create a GitHub repository.", 'start': 707.538, 'duration': 4.881}, {'end': 718.281, 'text': "here. I'm going to create this repository and after that I'll be uploading it.", 'start': 713.576, 'duration': 4.705}, {'end': 720.984, 'text': "I'll upload this particular code over here.", 'start': 718.281, 'duration': 2.703}, {'end': 729.273, 'text': "okay, but before uploading the code, let's see some of the configuration files that you have to create before you know deploying it.", 'start': 720.984, 'duration': 8.289}, {'end': 734.158, 'text': 'in Heroku, the first configuration file is basically called as proc file.', 'start': 729.273, 'duration': 4.885}, {'end': 736.128, 'text': 'Now this proc file.', 'start': 735.148, 'duration': 0.98}, {'end': 737.489, 'text': 'let us understand what it is.', 'start': 736.128, 'duration': 1.361}, {'end': 745.433, 'text': 'Now this proc file basically says that for Heroku, you have to say that which is the first file you have to basically execute.', 'start': 738.23, 'duration': 7.203}, {'end': 750.936, 'text': 'For that, you have to use this G unicorn.', 'start': 746.574, 'duration': 4.362}, {'end': 754.838, 'text': 'Okay, you have to use the same syntax, web colon G unicorn.', 'start': 751.236, 'duration': 3.602}, {'end': 761.289, 'text': 'And now you have to specify which is your file of your flask which you want to run first.', 'start': 755.398, 'duration': 5.891}, {'end': 764.03, 'text': 'so my file name is basically app.py.', 'start': 761.289, 'duration': 2.741}], 'summary': 'Deploy solution to heroku: create github repo, configure proc file, and execute app.py with gunicorn.', 'duration': 45.749, 'max_score': 703.737, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o703737.jpg'}, {'end': 850.268, 'src': 'heatmap', 'start': 780.936, 'weight': 0, 'content': [{'end': 789.159, 'text': 'then you use colon and the next parameter that you specify over here should be your flask name, flask app name.', 'start': 780.936, 'duration': 8.223}, {'end': 791.841, 'text': "so here you can see again i'm writing it as app.", 'start': 789.159, 'duration': 2.682}, {'end': 795.282, 'text': 'so you just copy this and paste it over here.', 'start': 791.841, 'duration': 3.441}, {'end': 800.185, 'text': 'okay, so this is the first file that needs to get created, which is called as proc file.', 'start': 795.282, 'duration': 4.903}, {'end': 808.87, 'text': 'okay, now, after this, you also have to take care of one more file, which is called as requirement.txt.', 'start': 800.185, 'duration': 8.685}, {'end': 810.771, 'text': 'now, this is the most important file.', 'start': 808.87, 'duration': 1.901}, {'end': 820.319, 'text': "guys, this is the most important file, because in my model you'll be seeing that I have used various things like numpy, matplotlib, pandas, pickle,", 'start': 810.771, 'duration': 9.548}, {'end': 825.044, 'text': 'all the things right, flask, and here in app.py also used flask.', 'start': 820.319, 'duration': 4.725}, {'end': 834.353, 'text': 'so I have to basically mention all the libraries that that has to get installed in my environment when I am deploying into Heroku.', 'start': 825.044, 'duration': 9.309}, {'end': 842.941, 'text': 'okay, so I have to specify the library name, the version name, all the library names, like NumPy, Skypy, Skykit, Learn, Matplotlib, Pandas.', 'start': 834.353, 'duration': 8.588}, {'end': 850.268, 'text': 'And suppose, if some of the libraries are basically missing, then after you deploy your whole code into Heroku,', 'start': 843.442, 'duration': 6.826}], 'summary': 'Creating procfile and requirement.txt for heroku deployment with specified libraries and version names.', 'duration': 50.083, 'max_score': 780.936, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o780936.jpg'}, {'end': 938.627, 'src': 'embed', 'start': 906.849, 'weight': 5, 'content': [{'end': 910.35, 'text': 'Let us go back and upload my code in my GitHub.', 'start': 906.849, 'duration': 3.501}, {'end': 914.272, 'text': "Okay So for uploading the code, I'll just go and click on upload files.", 'start': 910.45, 'duration': 3.822}, {'end': 916.532, 'text': "I'll go and choose the file.", 'start': 915.172, 'duration': 1.36}, {'end': 920.594, 'text': 'Okay So this is my complete file structure.', 'start': 916.552, 'duration': 4.042}, {'end': 922.594, 'text': 'So let me just take templates.', 'start': 921.014, 'duration': 1.58}, {'end': 924.695, 'text': "I'm going to take get ignore.", 'start': 923.375, 'duration': 1.32}, {'end': 926.716, 'text': "I'm going to take a app.py.", 'start': 924.855, 'duration': 1.861}, {'end': 929.379, 'text': "I'm going to take model dot PKL.", 'start': 927.577, 'duration': 1.802}, {'end': 931.681, 'text': "I'm going to take model dot.", 'start': 929.839, 'duration': 1.842}, {'end': 938.627, 'text': "model dot PY is not necessary because this is this will get trained anywhere outside and then I'll take requirement dot TXT.", 'start': 931.681, 'duration': 6.946}], 'summary': 'Uploading code to github, including templates, app.py, model files, and requirements.txt.', 'duration': 31.778, 'max_score': 906.849, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o906849.jpg'}], 'start': 695.875, 'title': 'Deploying python code to heroku', 'summary': 'Details the process of deploying python code to heroku, including specifying libraries in requirement.txt, emphasizing the importance of procfile, and outlining the process of uploading code to github.', 'chapters': [{'end': 825.044, 'start': 695.875, 'title': 'Deploying flask app on heroku', 'summary': 'Details the steps for deploying a flask app on heroku, including creating a github repository, configuring a proc file, and the importance of requirement.txt file for deploying the model, emphasizing the necessity of specific files and commands for successful deployment.', 'duration': 129.169, 'highlights': ["The proc file specifies the first file to be executed for Heroku, using the command 'web: gunicorn' followed by the flask file name (e.g., 'app.py').", 'Creating a GitHub repository and uploading the code are initial steps for deploying the Flask app on Heroku.', "The 'requirement.txt' file, crucial for the model, includes essential dependencies like numpy, matplotlib, pandas, pickle, and flask."]}, {'end': 953.08, 'start': 825.044, 'title': 'Deploying python code to heroku', 'summary': 'Explains the process of deploying python code to heroku, outlining the libraries to be specified in the requirement.txt file, the importance of the procfile, and the process of uploading the code to github.', 'duration': 128.036, 'highlights': ['The requirement.txt file needs to include the names and versions of all required libraries, such as NumPy, Scipy, Scikit-learn, Matplotlib, and Pandas, to ensure they are installed in the Heroku environment. The chapter emphasizes the need to specify all required libraries, such as NumPy, Scipy, Scikit-learn, Matplotlib, and Pandas, in the requirement.txt file for installation in the Heroku environment.', 'The procfile serves as a configuration file, specifying the file from which the execution should start in the Heroku environment. Explains the role of the procfile as a configuration file that designates the file for execution in the Heroku environment.', 'The process of uploading code to GitHub involves selecting and uploading necessary files, including templates, app.py, model.pkl, and requirement.txt. Details the process of selecting and uploading essential files, such as templates, app.py, model.pkl, and requirement.txt, to GitHub for deployment.']}], 'duration': 257.205, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o695875.jpg', 'highlights': ["The 'requirement.txt' file includes essential dependencies like numpy, matplotlib, pandas, pickle, and flask.", 'Creating a GitHub repository and uploading the code are initial steps for deploying the Flask app on Heroku.', "The proc file specifies the first file to be executed for Heroku, using the command 'web: gunicorn' followed by the flask file name (e.g., 'app.py').", 'The requirement.txt file needs to include the names and versions of all required libraries, such as NumPy, Scipy, Scikit-learn, Matplotlib, and Pandas, to ensure they are installed in the Heroku environment.', 'The procfile serves as a configuration file, specifying the file from which the execution should start in the Heroku environment.', 'The process of uploading code to GitHub involves selecting and uploading necessary files, including templates, app.py, model.pkl, and requirement.txt.']}, {'end': 1406.8, 'segs': [{'end': 1001.224, 'src': 'heatmap', 'start': 971.474, 'weight': 0.745, 'content': [{'end': 976.959, 'text': 'it will just not deploy it in your github or it will not just commit in your github repository.', 'start': 971.474, 'duration': 5.485}, {'end': 984.361, 'text': "so what I'll do is that I'll just go here, I'll click on this template folder and I'll manually deploy it like this", 'start': 976.959, 'duration': 7.402}, {'end': 985.901, 'text': 'I mean, commit it like this.', 'start': 984.941, 'duration': 0.96}, {'end': 989.522, 'text': 'So now you can see template and index.html is there.', 'start': 986.001, 'duration': 3.521}, {'end': 991.042, 'text': "I'll commit the changes.", 'start': 990.022, 'duration': 1.02}, {'end': 995.803, 'text': 'Once I commit the changes, now the next thing is very, very important.', 'start': 991.682, 'duration': 4.121}, {'end': 1001.224, 'text': "What I have to do is that I've performed most of the steps over here.", 'start': 996.563, 'duration': 4.661}], 'summary': 'Manually deploying and committing changes to github repository.', 'duration': 29.75, 'max_score': 971.474, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o971474.jpg'}, {'end': 1037.645, 'src': 'heatmap', 'start': 1001.384, 'weight': 1, 'content': [{'end': 1004.085, 'text': 'I have basically committed all the codes in my GitHub repository.', 'start': 1001.384, 'duration': 2.701}, {'end': 1005.445, 'text': 'This is just like repository.', 'start': 1004.105, 'duration': 1.34}, {'end': 1009.266, 'text': 'The next thing is that you go to your Heroku, heroku.com.', 'start': 1005.965, 'duration': 3.301}, {'end': 1013.266, 'text': 'Login create a login ID for one account.', 'start': 1010.484, 'duration': 2.782}, {'end': 1014.327, 'text': 'It is basically free.', 'start': 1013.306, 'duration': 1.021}, {'end': 1018.911, 'text': 'You can basically create a sample API and you can start working into it.', 'start': 1014.727, 'duration': 4.184}, {'end': 1028.657, 'text': 'Okay, so after this, once you log in, you will have something screen like this click on new and say create new app and Give the app name suppose.', 'start': 1018.911, 'duration': 9.746}, {'end': 1037.645, 'text': "I want to give ml salary prediction API okay, just I'm going to rename.", 'start': 1028.759, 'duration': 8.886}], 'summary': 'Codes committed to github, create free heroku account, create sample api for ml salary prediction.', 'duration': 36.261, 'max_score': 1001.384, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o1001384.jpg'}, {'end': 1129.305, 'src': 'heatmap', 'start': 1099.187, 'weight': 0.745, 'content': [{'end': 1104.15, 'text': 'So just download it and exe file will get in, uh, you know, downloaded and you can basically install it.', 'start': 1099.187, 'duration': 4.963}, {'end': 1106.332, 'text': "What I'll do is that I'll just connect to GitHub.", 'start': 1104.791, 'duration': 1.541}, {'end': 1111.083, 'text': "Now, as soon as I connect to GitHub, I'll go and search for my repository.", 'start': 1107.54, 'duration': 3.543}, {'end': 1113.606, 'text': 'I hope you remember my repository.', 'start': 1111.924, 'duration': 1.682}, {'end': 1114.707, 'text': 'So it is Heroku demo.', 'start': 1113.626, 'duration': 1.081}, {'end': 1117.329, 'text': "Okay So I'm going to write Heroku.", 'start': 1115.087, 'duration': 2.242}, {'end': 1121.461, 'text': "Demo, I'll just search it over here.", 'start': 1119.6, 'duration': 1.861}, {'end': 1124.363, 'text': "Now here you can see that it'll ku demo is here.", 'start': 1121.481, 'duration': 2.882}, {'end': 1126.184, 'text': "I'm just going to connect it.", 'start': 1124.603, 'duration': 1.581}, {'end': 1129.305, 'text': 'So once it is connected, you will be able to see all the files.', 'start': 1126.184, 'duration': 3.121}], 'summary': "Download and install the exe file, connect to github, search and connect to the 'heroku demo' repository, then view all the files.", 'duration': 30.118, 'max_score': 1099.187, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o1099187.jpg'}, {'end': 1163.272, 'src': 'embed', 'start': 1134.728, 'weight': 2, 'content': [{'end': 1136.469, 'text': 'Now there are two options for deployment.', 'start': 1134.728, 'duration': 1.741}, {'end': 1139.451, 'text': 'You can also do automatic deployment or you can do manual deployment.', 'start': 1136.489, 'duration': 2.962}, {'end': 1146.891, 'text': 'Automatic deployment is a process that whenever you make a commit into that repository, automatically the deployment will happen.', 'start': 1140.006, 'duration': 6.885}, {'end': 1150.114, 'text': 'If you want in that way, you just enable automatic deployments.', 'start': 1147.352, 'duration': 2.762}, {'end': 1154.357, 'text': 'If you want manual deployment, all you have to do is deploy this particular branch.', 'start': 1150.614, 'duration': 3.743}, {'end': 1155.878, 'text': "I'll just go and click here.", 'start': 1154.757, 'duration': 1.121}, {'end': 1158.251, 'text': "So I'll go and click on deploy branch.", 'start': 1156.67, 'duration': 1.581}, {'end': 1160.591, 'text': 'I made sure I have that proc file.', 'start': 1158.651, 'duration': 1.94}, {'end': 1163.272, 'text': 'Now you see that all the installation will happen automatically.', 'start': 1160.611, 'duration': 2.661}], 'summary': 'Options for deployment: automatic or manual. automatic deployment triggers on commit, while manual requires branch deployment. installation occurs automatically.', 'duration': 28.544, 'max_score': 1134.728, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o1134728.jpg'}, {'end': 1232.773, 'src': 'embed', 'start': 1197.838, 'weight': 0, 'content': [{'end': 1200.28, 'text': 'Now guys, you can see that it is saying done.', 'start': 1197.838, 'duration': 2.442}, {'end': 1203.742, 'text': 'It is launching and this is the URL that is getting created.', 'start': 1201, 'duration': 2.742}, {'end': 1205.324, 'text': 'See this, this is wonderful.', 'start': 1203.782, 'duration': 1.542}, {'end': 1207.325, 'text': 'This particular URL is basically created.', 'start': 1205.384, 'duration': 1.941}, {'end': 1210.087, 'text': 'Now this particular URL will be applicable globally.', 'start': 1207.805, 'duration': 2.282}, {'end': 1215.85, 'text': 'So it will now, it is just deploying another hardly 10 seconds.', 'start': 1211.189, 'duration': 4.661}, {'end': 1218.691, 'text': 'It will require, but the URL is basically created.', 'start': 1216.57, 'duration': 2.121}, {'end': 1223.531, 'text': 'So finally you see that it has been, the app has successfully deployed.', 'start': 1219.631, 'duration': 3.9}, {'end': 1224.772, 'text': 'You just have to click on view.', 'start': 1223.551, 'duration': 1.221}, {'end': 1226.532, 'text': 'You may get some error.', 'start': 1225.592, 'duration': 0.94}, {'end': 1229.013, 'text': 'Sometimes you may not get some error.', 'start': 1227.452, 'duration': 1.561}, {'end': 1232.773, 'text': "If you get, if you are getting some errors, just understand that you're missing some deployments.", 'start': 1229.093, 'duration': 3.68}], 'summary': 'Successful app deployment with global url creation in 10 seconds', 'duration': 34.935, 'max_score': 1197.838, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o1197838.jpg'}], 'start': 954.881, 'title': 'Deploying template folder and ml model', 'summary': 'Demonstrates manual deployment of a template folder in a github repository, emphasizing file presence and committing changes, and illustrates deploying a machine learning model using heroku, resulting in a globally applicable url and successful model deployment.', 'chapters': [{'end': 1001.224, 'start': 954.881, 'title': 'Deploying template folder in github repository', 'summary': 'Demonstrates manually deploying a template folder in a github repository, ensuring the presence of template and index.html files and committing the changes, emphasizing the completion of most steps in the process.', 'duration': 46.343, 'highlights': ['Manually deploying a template folder in a GitHub repository by committing the changes, ensuring the presence of template and index.html files.', 'Emphasizing the completion of most steps in the deployment process.']}, {'end': 1406.8, 'start': 1001.384, 'title': 'Deploying ml model using heroku', 'summary': 'Illustrates the process of deploying a machine learning model using heroku, including creating a new app, connecting to github repository, deployment options, and checking logs, resulting in a globally applicable url and successful model deployment.', 'duration': 405.416, 'highlights': ['Creating a new app on Heroku and connecting to GitHub repository The process involves creating a new app on Heroku, connecting it to a GitHub repository, and enabling automatic or manual deployment options.', "Deployment options and automatic installation of libraries The deployment options include automatic or manual deployment, with automatic deployment triggering the process upon each commit, and the automatic installation of required libraries from 'requirement.txt' during deployment.", 'Accessing globally applicable URL and checking logs After deployment, a globally applicable URL is generated, and logs can be checked using the Heroku command line interface to monitor the status of the deployment and identify errors.']}], 'duration': 451.919, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/mrExsjcvF4o/pics/mrExsjcvF4o954881.jpg', 'highlights': ['Emphasizing the completion of most steps in the deployment process.', 'Creating a new app on Heroku and connecting to GitHub repository.', 'Deployment options include automatic or manual deployment, with automatic deployment triggering the process upon each commit.', 'Accessing globally applicable URL and checking logs after deployment.']}], 'highlights': ['The tutorial focuses on the deployment of machine learning models using Flask into Heroku, a platform as a service.', 'The chapter outlines the process of training a model, creating a web app using Flask, committing the code to GitHub, linking the GitHub repository to Heroku, and deploying the model.', 'The web app is accessible via a Heroku URL with three fields: experience, test score, and interview score.', 'The chapter demonstrates creating a salary prediction API.', 'Model trained on a 12-year experience dataset to predict employee salaries.', 'Plans to deploy more complex problem statements from Kaggle in the future.', 'Creating independent features like experience, test score, and interview score to predict salary.', 'Applying feature engineering to replace NAN values in the experience and test score features.', 'Utilizing a simple linear regression model to fit the data for predicting salaries.', 'The process of deploying a machine learning model using Flask involves creating a pickle file.', 'Using pickle to dump the model results in a file called model.pkl, which needs to be deployed in the Heroku environment.', 'Creating a web app with Flask involves importing numpy, flask, and pickle.', 'Running the Flask framework locally requires changing the directory to where the code is stored.', "The 'requirement.txt' file includes essential dependencies like numpy, matplotlib, pandas, pickle, and flask.", 'Creating a GitHub repository and uploading the code are initial steps for deploying the Flask app on Heroku.', "The proc file specifies the first file to be executed for Heroku, using the command 'web: gunicorn' followed by the flask file name (e.g., 'app.py').", 'The requirement.txt file needs to include the names and versions of all required libraries, such as NumPy, Scipy, Scikit-learn, Matplotlib, and Pandas, to ensure they are installed in the Heroku environment.', 'The procfile serves as a configuration file, specifying the file from which the execution should start in the Heroku environment.', 'The process of uploading code to GitHub involves selecting and uploading necessary files, including templates, app.py, model.pkl, and requirement.txt.', 'Emphasizing the completion of most steps in the deployment process.', 'Creating a new app on Heroku and connecting to GitHub repository.', 'Deployment options include automatic or manual deployment, with automatic deployment triggering the process upon each commit.', 'Accessing globally applicable URL and checking logs after deployment.']}