I have started doing a few months ago with Jose Portilla's course. Any time I get any problem, you solve it in a crazily simple way with your insights as well. Much Respect
until now, i didn't know how to use Data science to real life...but learned it without reason. after seeing this video...i learnt meaning of data science thanks lot sir.
thanks sir, great stuff. i have a small suggestion sir, first show the final output and then explain how it is working then we have the clear picture of whats going on.
This one video changed my life :) Thanks a lot Krish... Can't appreciate you enough for all the great help you do for the most elementary students like me _^_
Which is more better standard : Creating a api that gives json responses or Creating an api which renders html pages. I think first one is more suitable because we can manipulate the response use javascript .
THANKS for the tutorial ! . any request to get a page with a route is a GET request , therefore request_api route wouldn't work unless you add GET method to the function route or just remove POST method ,you don't have to post anything to server in this case .( default method is GET )
good video. although from the point at which you are trying to execute the "API" mode (predict_api) it got a bit confusing. I'm not sure I followed that part so well.
I used "Postman" to make the call to the predict_api. worked great!! Needed to use double quotes in the JSON payload though. {"experience":2, "test_score":9, "interview_score":6}
Hi Thanks for your useful video. However, If we already have the machine learning model trained I don't think we still need the dataset and model.py in the templates!
at 11:15 the reason its not working because you just stopped the server at localhost:5000 so the post request from request.py will not the served, instead if you run request.py in another cmd window ( without stopping the app.py server ) it'll work. anyways Great Tutorial
Hey krish! Your explanation method is very accurate hatsoff! could you make a video guiding through the timeline of all the steps (in execution) required for making your custom model (i.e training and testing alongside) and using that in your app?
a DOUBT!!! Sir, I followed your steps and I loved it. I finally learned how to do this stuff. But I've got a doubt. You did internal CSS styling in this tutorial. When I started playing with things, I removed internal styling and did external styling just to make things optimized and easy. But after doing this change, when I again run the server, I cannot see any styling just plain HTML setup. Basically, I'm an ML guy and I don't know anything about webD, so I watched many tutorials to see if I can debug this, but to my bad, I cannot! Please help me. And afterward, when I again switched back to internal styling, everything got ok! But I want to do external styling, it makes things easier when working with bigger projects. Save me.
i deployed my model but the html css file are not applying to it... if i open the html file without deploying the model directly then only the css file gets appliied to html...how to fix this...???? plz help...!!!
Hi Krish, could you elaborate on this line for the api prediction = model.predict([np.array(list(data.values()))]) predict needs a list as far as I know Why did you first convert data to array then put this in a list and then put this list into an array and finally in a list again. Could you please be more specific here Thanks and keep up your good work. Like to see more real projects best regards
I am getting this error can u pls help me out File "app.py", line 6, in model = pickle.load(open('model.pkl', 'rb')) ModuleNotFoundError: No module named 'sklearn.linear_model.base'
I now have it working. (Python 3.9) You need to edit the following in model.py : replace the 2 lines commented out with with these 2 lines and it works! from sklearn.linear_model import LinearRegression regressor = LinearRegression() #from sklearn.tree import DecisionTreeRegression #regressor = DecisionTreeRegression() Feel free to contact me via my channel if you need help.
So the program is great and was really helpful but a problem encountered tryin to put 2 seperate models is, 1. When you run app.py it only opens 127.0.0.1:5000/ which is your first function, if you attempt running 127.0.0.1:5000/predict_model2 it would bring a 405 error because firstly it should be a GET method not POST 2. It gives a Value error when you eventually make it a GET method and that's because your variable int_features runs before the values for int_features are inputed which should now proceed to final_feature
Sir , what if we have done onehot encoding? will there be convertion by pkl file or we need to add extra code to convert categorical to onehot columns.
model = pickle.load(open('model.pkl', 'rb')) ModuleNotFoundError: No module named 'sklearn.linear_model.base' I'm facing with this issue.. Can anyone tell me what is the problem?
Why most of people mix front-end and back-end deployment in there videos. Whereas on production machine learning model API are deployed on separate machine and front-end on different machine.
Has anyone noticed that when you hit the predict button, you'll get redirected to the same page with the output from the regression model but with the initial inputs absent? Does anyone know how to fix this?
Hi krish I have doubt regarding nan ... I got a dataset where the some cells of the csv file having no values however the no value data are over taken by spaces and when I try to find nan using isnull().sum() function ... it is not detecting any nan or na value ... how can I solve this
I did same things myself got error... Downloaded zip from github tried agin... error.. please help... Predict button opening new page and showing this page isn't working😭
Hello Sir i have seen your deployment video it very helpful, but i just want to know that i don't know i single word of HTML so how to do coding in html in deployment process, or is there any other way?
Thank you for a great tutorial! I followed your tutorials but I got error message on the web page saying {"msg":"Try POSTing to the /predict endpoint with an RGB image attachment"}. Do you know how to solve this problem?
I have started doing a few months ago with Jose Portilla's course. Any time I get any problem, you solve it in a crazily simple way with your insights as well. Much Respect
Jose Portilla + Krish = You can solve any problem
until now, i didn't know how to use Data science to real life...but learned it without reason.
after seeing this video...i learnt meaning of data science
thanks lot sir.
thanks sir, great stuff.
i have a small suggestion sir,
first show the final output and then explain how it is working then we have the clear picture of whats going on.
Excellent one. Can you develop same with CNN image recognition. Thanks once again for sharing. Keep up good work
This one video changed my life :) Thanks a lot Krish... Can't appreciate you enough for all the great help you do for the most elementary students like me _^_
Thanks for sharing this. I was working on fake news detection and this was very helpful
Thank you so much for this tutorial. Every aspect of this video was clear, methodical and simple.
I was looking exactly for this!
Thanks a lot for such a detailed video!
Everything is well explained. Thank you Krish
Thanks Krish for creating such an easy video. Really appreciate it. Definitely going to use it soon for my upcoming model deployment.
Which is more better standard : Creating a api that gives json responses or Creating an api which renders html pages. I think first one is more suitable because we can manipulate the response use javascript .
gr8 teaching! Thanks a lot Krish
Great work Krish!!!! It's really very helpful
Hi,
Thank you so much for this tutorial. Your explanation has helped us a lot on our mini project on movie recommendation system.
THANKS for the tutorial ! . any request to get a page with a route is a GET request , therefore request_api route wouldn't work unless you add GET method to the function route or just remove POST method ,you don't have to post anything to server in this case .( default method is GET )
You explained it so well. Thank you very much for the video.
Thank you for the tutorial. Please upload more videos on computer vision
Thanks Now i can Deploy my model on Android And Webpage :D
Thanks a lot for this amazing and helpful tutorial.
Thank you sir! It was a great learning. You made my day.
good video. although from the point at which you are trying to execute the "API" mode (predict_api) it got a bit confusing. I'm not sure I followed that part so well.
I used "Postman" to make the call to the predict_api. worked great!! Needed to use double quotes in the JSON payload though.
{"experience":2, "test_score":9, "interview_score":6}
sir if we want to input 5 values then what changes should we make?? please answer!!!
thanks sir!
Please make more videos on flask with ml I mean different scenarios
Hello sir , can you make a video on deploying a text classification model in flask.
At last, you must running your dev server and then run the request.py script in another console.
Could you also explain how we can preprocess the incoming data after deployment? Thanks for the great tutorial Krish
Preprocess your train data and save that to a file, then use the saved model to transform your incoming data.
Hi Thanks for your useful video. However, If we already have the machine learning model trained I don't think we still need the dataset and model.py in the templates!
Hi Krish! Please can yo make a video on how to integrate a website build on MERN stack with machine learning and deep learning models.
at 11:15 the reason its not working because you just stopped the server at localhost:5000 so the post request from request.py will not the served, instead if you run request.py in another cmd window ( without stopping the app.py server ) it'll work.
anyways Great Tutorial
Please provide a detailed tutorial of everything.
Hey krish! Your explanation method is very accurate hatsoff! could you make a video guiding through the timeline of all the steps (in execution) required for making your custom model (i.e training and testing alongside) and using that in your app?
the code is not running ... i gettting template missing error
awesome tutorial, short but complete. thanks
How to run app.py file in anaconda prompt , cause i run this file and i didn't get anything
Thanks for this video. Simple and easy to understand :)
can you tell, what problem we face if we dont do it through virtual envrionement?
Wonderfull video and most awaited
Thanks for the video, very helpful for my project
Hi Krish, this is on development server, what changes required to put the same model in production
a DOUBT!!! Sir, I followed your steps and I loved it. I finally learned how to do this stuff. But I've got a doubt.
You did internal CSS styling in this tutorial. When I started playing with things, I removed internal styling and did external styling just to make things optimized and easy. But after doing this change, when I again run the server, I cannot see any styling just plain HTML setup. Basically, I'm an ML guy and I don't know anything about webD, so I watched many tutorials to see if I can debug this, but to my bad, I cannot! Please help me.
And afterward, when I again switched back to internal styling, everything got ok!
But I want to do external styling, it makes things easier when working with bigger projects.
Save me.
u r hero of my learning thanks a lot😀
@Krish.Naik Great Work!!! Quick Question for you? How can business consume prediction which comes from deployed models?
Very nice explanation.Can you make a video on how to deploy Kmeans clustering(unsupervised)
how can we deploy descriptive model like an wordcloud generating model
Can you please create a video on deployment in cloud
thank you very much , do you have a tutorial on how to deploy multiple models on server ,? , not just one model ,
www.doorstepme.com
As it is implemented 🤩
My .pkl file is 160 mb, its not supporting in heroku. What to do
i deployed my model but the html css file are not applying to it...
if i open the html file without deploying the model directly then only the css file gets appliied to html...how to fix this...???? plz help...!!!
Hi Krish, could you elaborate on this line for the api
prediction = model.predict([np.array(list(data.values()))])
predict needs a list as far as I know
Why did you first convert data to array then put this in a list and then put this list into an array and finally in a list again.
Could you please be more specific here
Thanks and keep up your good work. Like to see more real projects
best regards
HI,
I have ML model created using PySpark ML pipeline,
how can i deploy these model? is possible to deploy Spark ML model using flask?
Please let us know if we need to process file and predict output, how can we achieve this
Hi...I am getting the output in json format and used js and jQuery post call ...how to output the data to screen. Can u please suggest
I want to submit text data instead of int data in predict function please tell me what changes I should do
Can I have an exemple with logistic regression
in which language flask environment & index.html is being created??? plz anyone answer
Great help. Working perfectly.
Very nicely done tutorial. Thank you.
Hi I am unable to run it on my Macbook using Anaconda Spyder
can you plz tell how can we input a file if feature no is as high as 500
Even if we don't use request.py, our application will still function correctly. So why we need a request.py file?
Hlo, can u show the execution of flask
I am getting this error can u pls help me out
File "app.py", line 6, in
model = pickle.load(open('model.pkl', 'rb'))
ModuleNotFoundError: No module named 'sklearn.linear_model.base'
I am getting the same error as well
This might explain the issue...
stackoverflow.com/questions/65714366/modulenotfounderror-no-module-named-sklearn-linear-model-base
I now have it working. (Python 3.9)
You need to edit the following in model.py :
replace the 2 lines commented out with with these 2 lines and it works!
from sklearn.linear_model import LinearRegression
regressor = LinearRegression()
#from sklearn.tree import DecisionTreeRegression
#regressor = DecisionTreeRegression()
Feel free to contact me via my channel if you need help.
@@python360 thanks I will try
@@python360 after i click on the predict button, the answer does not show up. Everything is fine, the model.py, index.html, model.pkl
how to can input image to predict
Hi Krish...how can one deploy trained model on Nvidia Jetson board to detect object ?
how do we add a new row in the dataset from the websitethat we create
how to make api call without the html file?
But where is the deployment part? U r running it on local host
Thanks the way you explain is very interesting but how can I found the code please link.
What is the rate of change of deployment of machine learning models
Can you please tell me how to take string values in the flask... you are taking integers features.. I wish to take string values
I faced this error, Any solution * TypeError: float() argument must be a string or a number, not 'generator' *
Can you make a video on Ploty,Dash and Streamlit
How do you can make it good when we have something not in range as our inputs ?
Hi Krish, I have a question. Will it model.py be exucated only first time. Means you need to train your model only for first time.
Thanks Krish
So the program is great and was really helpful but a problem encountered tryin to put 2 seperate models is,
1. When you run app.py it only opens 127.0.0.1:5000/ which is your first function, if you attempt running 127.0.0.1:5000/predict_model2 it would bring a 405 error because firstly it should be a GET method not POST
2. It gives a Value error when you eventually make it a GET method and that's because your variable int_features runs before the values for int_features are inputed which should now proceed to final_feature
So can you resolve this and make every function work when you call them in the link e.g
127.0.0.1:5000/predict
127.0.0.1:5000/predict_api
Insted of pickle can I use joblib. And if I use joblib what is the file extension that I have to use. Is it .pkl. or any other extension
how to handles categorical......if input is a catgegorical variable.....
how to import multiple pickle file if 3-4 algorithm are used in project
Plz share with me if u find solution even I am confused how to do that
Is it mandatory to have .pkl file while integrate using flask for any project?
Hi, I cannot run the app.py in the cmd prompt. Can anyone help me out with it
HOW DO YOU GAVE JASON VALUES
Loved this video...Thanks for the help.
Sir , what if we have done onehot encoding? will there be convertion by pkl file or we need to add extra code to convert categorical to onehot columns.
Hi Krish, I have an doubt please clear it whenever u get time. Is it possible to deploy the model using jupyter notebooks.
model = pickle.load(open('model.pkl', 'rb'))
ModuleNotFoundError: No module named 'sklearn.linear_model.base'
I'm facing with this issue.. Can anyone tell me what is the problem?
at first delete the pkl file and then run model.py
you will get a new pkl file.then run app.py.that worked for me
Hi Krish,
Thanks for the video but I am unable to change the html file with css.
Everytime I update css, it is remaining the same. Any suggestions?
Why most of people mix front-end and back-end deployment in there videos. Whereas on production machine learning model API are deployed on separate machine and front-end on different machine.
What is the necessity of having request.py file
Thanks for a great tutorial. Is this different if i want to deploy the xgboost model using the same technique you showed?
can we use joblib in place of pickle? Are these the same kind of thing?
Has anyone noticed that when you hit the predict button, you'll get redirected to the same page with the output from the regression model but with the initial inputs absent? Does anyone know how to fix this?
Please make a video on ml model with flask , php and mysql db that predict using a single row using mysql db .. please
Hi krish
I have doubt regarding nan ... I got a dataset where the some cells of the csv file having no values however the no value data are over taken by spaces and when I try to find nan using isnull().sum() function ... it is not detecting any nan or na value ... how can I solve this
Hi one query If I want to pass the bulk record for Prediction will it able to Predict ? if yes can you let me know the method ?
I did same things myself got error... Downloaded zip from github tried agin... error.. please help... Predict button opening new page and showing this page isn't working😭
Hello Sir i have seen your deployment video it very helpful, but i just want to know that i don't know i single word of HTML so how to do coding in html in deployment process, or is there any other way?
Can we do the same with svm?
Thank you for a great tutorial! I followed your tutorials but I got error message on the web page saying {"msg":"Try POSTing to the /predict endpoint with an RGB image attachment"}. Do you know how to solve this problem?
Sir upload videos related to flask