Deploy Machine Learning Model using Flask

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 194

  • @Draxper
    @Draxper 3 года назад +7

    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

  • @ramanjaneyuluthanniru1428
    @ramanjaneyuluthanniru1428 4 года назад +1

    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.

  • @lokeshpaladugula5793
    @lokeshpaladugula5793 5 лет назад +6

    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.

  • @akd9977
    @akd9977 5 лет назад +25

    Excellent one. Can you develop same with CNN image recognition. Thanks once again for sharing. Keep up good work

  • @collinsrajendran8326
    @collinsrajendran8326 4 года назад +12

    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 _^_

  • @priyankabarnwal1919
    @priyankabarnwal1919 3 года назад

    Thanks for sharing this. I was working on fake news detection and this was very helpful

  • @rohandeshpande2264
    @rohandeshpande2264 5 лет назад +15

    Thank you so much for this tutorial. Every aspect of this video was clear, methodical and simple.

  • @mohaktrivedi9591
    @mohaktrivedi9591 4 года назад +3

    I was looking exactly for this!
    Thanks a lot for such a detailed video!

  • @agoualejohankouame9115
    @agoualejohankouame9115 4 года назад

    Everything is well explained. Thank you Krish

  • @HabibKhan-kj8um
    @HabibKhan-kj8um 3 года назад

    Thanks Krish for creating such an easy video. Really appreciate it. Definitely going to use it soon for my upcoming model deployment.

  • @animeshmishra4282
    @animeshmishra4282 3 года назад

    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 .

  • @anubratadas1
    @anubratadas1 3 года назад

    gr8 teaching! Thanks a lot Krish

  • @sanskrititiwari4267
    @sanskrititiwari4267 4 года назад

    Great work Krish!!!! It's really very helpful

  • @84siddharth
    @84siddharth 5 лет назад +1

    Hi,
    Thank you so much for this tutorial. Your explanation has helped us a lot on our mini project on movie recommendation system.

  • @hamdihaddad6791
    @hamdihaddad6791 4 года назад +1

    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 )

  • @smrutismitalenka8207
    @smrutismitalenka8207 3 года назад

    You explained it so well. Thank you very much for the video.

  • @pradhumansingh4563
    @pradhumansingh4563 4 года назад

    Thank you for the tutorial. Please upload more videos on computer vision

  • @RoyoItakoride
    @RoyoItakoride 3 года назад

    Thanks Now i can Deploy my model on Android And Webpage :D

  • @abdurrahmanshehumaihula2755
    @abdurrahmanshehumaihula2755 3 года назад +1

    Thanks a lot for this amazing and helpful tutorial.

  • @mayankpatil7303
    @mayankpatil7303 2 года назад

    Thank you sir! It was a great learning. You made my day.

  • @oldrunnerstepx2638
    @oldrunnerstepx2638 4 года назад +1

    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.

    • @oldrunnerstepx2638
      @oldrunnerstepx2638 4 года назад

      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}

  • @devanshsrivastava3185
    @devanshsrivastava3185 4 года назад +1

    sir if we want to input 5 values then what changes should we make?? please answer!!!
    thanks sir!

  • @kalyan4736
    @kalyan4736 3 года назад

    Please make more videos on flask with ml I mean different scenarios

  • @herambshetkar3950
    @herambshetkar3950 Год назад

    Hello sir , can you make a video on deploying a text classification model in flask.

  • @marufkhan23508
    @marufkhan23508 4 года назад +3

    At last, you must running your dev server and then run the request.py script in another console.

  • @serdarb8995
    @serdarb8995 4 года назад +10

    Could you also explain how we can preprocess the incoming data after deployment? Thanks for the great tutorial Krish

    • @adeebshahzad7893
      @adeebshahzad7893 3 года назад +2

      Preprocess your train data and save that to a file, then use the saved model to transform your incoming data.

  • @foodsscenes5891
    @foodsscenes5891 4 года назад +3

    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!

  • @happytorev466
    @happytorev466 Год назад

    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.

  • @amitbhattacharjee4321
    @amitbhattacharjee4321 4 года назад +1

    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

  • @floydfernandes2985
    @floydfernandes2985 4 года назад

    Please provide a detailed tutorial of everything.

  • @siddharthagrawal4280
    @siddharthagrawal4280 4 года назад

    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?

  • @adityapatnaik6079
    @adityapatnaik6079 5 лет назад +2

    the code is not running ... i gettting template missing error

  • @vinsmokearifka
    @vinsmokearifka 5 лет назад

    awesome tutorial, short but complete. thanks

  • @kajalraygude9184
    @kajalraygude9184 3 года назад +1

    How to run app.py file in anaconda prompt , cause i run this file and i didn't get anything

  • @VikashGupta-ym2ns
    @VikashGupta-ym2ns 4 года назад +1

    Thanks for this video. Simple and easy to understand :)

  • @sandhyaavasthi2468
    @sandhyaavasthi2468 Год назад

    can you tell, what problem we face if we dont do it through virtual envrionement?

  • @sivava1500
    @sivava1500 4 года назад

    Wonderfull video and most awaited

  • @harshgupta9262
    @harshgupta9262 4 года назад

    Thanks for the video, very helpful for my project

  • @kumarprasant7
    @kumarprasant7 Год назад

    Hi Krish, this is on development server, what changes required to put the same model in production

  • @parthikbhandari6903
    @parthikbhandari6903 5 лет назад +2

    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.

  • @vinodkinoni4863
    @vinodkinoni4863 5 лет назад

    u r hero of my learning thanks a lot😀

  • @swethakulkarni3563
    @swethakulkarni3563 5 лет назад +1

    @Krish.Naik Great Work!!! Quick Question for you? How can business consume prediction which comes from deployed models?

  • @utkarshasharma4762
    @utkarshasharma4762 5 лет назад

    Very nice explanation.Can you make a video on how to deploy Kmeans clustering(unsupervised)

  • @harimachavrapu2622
    @harimachavrapu2622 2 года назад

    how can we deploy descriptive model like an wordcloud generating model

  • @millionquotemotivationchan8182
    @millionquotemotivationchan8182 5 лет назад +1

    Can you please create a video on deployment in cloud

  • @khlchs2231
    @khlchs2231 4 года назад +2

    thank you very much , do you have a tutorial on how to deploy multiple models on server ,? , not just one model ,

    • @spr2770
      @spr2770 3 года назад

      www.doorstepme.com
      As it is implemented 🤩

  • @adithyaharish3530
    @adithyaharish3530 3 года назад

    My .pkl file is 160 mb, its not supporting in heroku. What to do

  • @Ir0nheart964
    @Ir0nheart964 4 года назад

    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...!!!

  • @DanielWeikert
    @DanielWeikert 5 лет назад +1

    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

  • @rohitkatkar3736
    @rohitkatkar3736 3 года назад

    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?

  • @nitinpatil1074
    @nitinpatil1074 5 лет назад +1

    Please let us know if we need to process file and predict output, how can we achieve this

  • @soumenckrd
    @soumenckrd 3 года назад

    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

  • @rohitkumar-nk6sd
    @rohitkumar-nk6sd 3 года назад

    I want to submit text data instead of int data in predict function please tell me what changes I should do

  • @WisalElalouan
    @WisalElalouan Год назад

    Can I have an exemple with logistic regression

  • @akshaypatil8155
    @akshaypatil8155 Год назад

    in which language flask environment & index.html is being created??? plz anyone answer

  • @mansoorbaig9232
    @mansoorbaig9232 4 года назад

    Great help. Working perfectly.

  • @jaideepadhvaryu9642
    @jaideepadhvaryu9642 4 года назад

    Very nicely done tutorial. Thank you.

  • @funtime12345
    @funtime12345 4 года назад

    Hi I am unable to run it on my Macbook using Anaconda Spyder

  • @jbh7079
    @jbh7079 2 года назад

    can you plz tell how can we input a file if feature no is as high as 500

  • @footballforfun2054
    @footballforfun2054 3 года назад

    Even if we don't use request.py, our application will still function correctly. So why we need a request.py file?

  • @sucharithamuthyam990
    @sucharithamuthyam990 2 года назад

    Hlo, can u show the execution of flask

  • @yativijay1336
    @yativijay1336 3 года назад +1

    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'

    • @python360
      @python360 3 года назад

      I am getting the same error as well

    • @python360
      @python360 3 года назад +1

      This might explain the issue...
      stackoverflow.com/questions/65714366/modulenotfounderror-no-module-named-sklearn-linear-model-base

    • @python360
      @python360 3 года назад +1

      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.

    • @yativijay1336
      @yativijay1336 3 года назад

      @@python360 thanks I will try

    • @krishnakiran3441
      @krishnakiran3441 3 года назад

      @@python360 after i click on the predict button, the answer does not show up. Everything is fine, the model.py, index.html, model.pkl

  • @أريجمصلح-ظ2ك
    @أريجمصلح-ظ2ك 3 года назад

    how to can input image to predict

  • @amoljadhav5380
    @amoljadhav5380 4 года назад

    Hi Krish...how can one deploy trained model on Nvidia Jetson board to detect object ?

  • @hrithiklanghi6418
    @hrithiklanghi6418 3 года назад

    how do we add a new row in the dataset from the websitethat we create

  • @hasanfahad5292
    @hasanfahad5292 5 лет назад +1

    how to make api call without the html file?

  • @arjunpukale3310
    @arjunpukale3310 4 года назад

    But where is the deployment part? U r running it on local host

  • @shemseshukre9357
    @shemseshukre9357 3 года назад

    Thanks the way you explain is very interesting but how can I found the code please link.

  • @Adinasa2
    @Adinasa2 4 года назад

    What is the rate of change of deployment of machine learning models

  • @arnabchoudhuri6193
    @arnabchoudhuri6193 4 года назад

    Can you please tell me how to take string values in the flask... you are taking integers features.. I wish to take string values

  • @muhammadtalmeez3276
    @muhammadtalmeez3276 3 года назад

    I faced this error, Any solution * TypeError: float() argument must be a string or a number, not 'generator' *

  • @angshumanbardhan3729
    @angshumanbardhan3729 4 года назад

    Can you make a video on Ploty,Dash and Streamlit

  • @sanjeetsingh-iz1rb
    @sanjeetsingh-iz1rb 3 года назад

    How do you can make it good when we have something not in range as our inputs ?

  • @coding_inmybrain8448
    @coding_inmybrain8448 4 года назад

    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.

  • @ayorinde5782
    @ayorinde5782 4 года назад

    Thanks Krish

  • @richardhayes2891
    @richardhayes2891 5 лет назад

    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

    • @richardhayes2891
      @richardhayes2891 5 лет назад

      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

  • @irshadkp7808
    @irshadkp7808 3 года назад

    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

  • @abhishekprakash9803
    @abhishekprakash9803 2 года назад

    how to handles categorical......if input is a catgegorical variable.....

  • @AbhishekSingh-ix2gi
    @AbhishekSingh-ix2gi 3 года назад

    how to import multiple pickle file if 3-4 algorithm are used in project

    • @ChinmayCorner
      @ChinmayCorner 3 года назад +1

      Plz share with me if u find solution even I am confused how to do that

  • @chaitrabhat8199
    @chaitrabhat8199 3 года назад

    Is it mandatory to have .pkl file while integrate using flask for any project?

  • @saurabhkohad6579
    @saurabhkohad6579 3 года назад

    Hi, I cannot run the app.py in the cmd prompt. Can anyone help me out with it

  • @dheerajkumark2268
    @dheerajkumark2268 4 года назад +1

    HOW DO YOU GAVE JASON VALUES

  • @shreyaanshyadav5353
    @shreyaanshyadav5353 5 лет назад

    Loved this video...Thanks for the help.

  • @talented_ignorant_
    @talented_ignorant_ 3 года назад

    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.

  • @MdNasir-ze9dq
    @MdNasir-ze9dq 4 года назад

    Hi Krish, I have an doubt please clear it whenever u get time. Is it possible to deploy the model using jupyter notebooks.

  • @lalithakandukuri8573
    @lalithakandukuri8573 Год назад

    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?

    • @30minhazulislammahi4
      @30minhazulislammahi4 11 месяцев назад

      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

  • @akshayjhawar1861
    @akshayjhawar1861 3 года назад

    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?

  • @aplombsunny
    @aplombsunny 4 года назад

    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.

  • @kumaratul5019
    @kumaratul5019 4 года назад +1

    What is the necessity of having request.py file

  • @rickyS-D76
    @rickyS-D76 5 лет назад

    Thanks for a great tutorial. Is this different if i want to deploy the xgboost model using the same technique you showed?

  • @nandinidasgupta7781
    @nandinidasgupta7781 4 года назад

    can we use joblib in place of pickle? Are these the same kind of thing?

  • @sagunshakya2579
    @sagunshakya2579 3 года назад

    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?

  • @irfannadeem3168
    @irfannadeem3168 5 лет назад

    Please make a video on ml model with flask , php and mysql db that predict using a single row using mysql db .. please

  • @datasciencegyan5145
    @datasciencegyan5145 5 лет назад

    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

  • @RohitGupta-tj7sh
    @RohitGupta-tj7sh 5 лет назад

    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 ?

  • @pratikhadawale132
    @pratikhadawale132 4 года назад

    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😭

  • @sandeepkumar-mo3mm
    @sandeepkumar-mo3mm 4 года назад

    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?

  • @vidyalakshmiprabhu7805
    @vidyalakshmiprabhu7805 3 года назад

    Can we do the same with svm?

  • @hebinlee7323
    @hebinlee7323 4 года назад

    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?

  • @VinodRS01
    @VinodRS01 5 лет назад

    Sir upload videos related to flask