Deploy Machine Learning Model Flask

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ธ.ค. 2024

ความคิดเห็น • 194

  • @StatsWire
    @StatsWire  3 ปีที่แล้ว +5

    Please watch the video in full screen because the font size is a little small, also download the entire code from GitHub, the link is provided in the description so you can increase the font size and change the theme if you want in your local machine. Thank you for watching.
    Here is the code link: github.com/siddiquiamir/ML-MODEL-DEPLOYMENT-USING-FLASK

  • @srichakritha-g4q
    @srichakritha-g4q 4 หลายเดือนก่อน +1

    🎯 Key points for quick navigation:
    00:00 *Learn to create and deploy a machine learning model using Flask.*
    00:14 *Steps: Build ML model, deploy with Flask, include `model.py` for the model and `app.py` for Flask application.*
    00:28 *Create `model.py` for ML model, convert to pickle, and create `app.py` for Flask app.*
    00:55 *`index.html` will contain HTML code, and `iris.csv` is the data for the model.*
    01:10 *Use PyCharm IDE for development; other IDEs like Visual Studio or Spyder can also be used.*
    01:22 *Create folder `ml_model_deployment` in C drive and place `iris.csv` and template folder inside.*
    02:32 *`index.html` contains HTML fields for input independent variables which will be used for prediction.*
    03:12 *Open PyCharm, navigate to the created folder, and start creating `model.py`.*
    04:26 *Import necessary libraries like pandas, sklearn, and random forest classifier for ML model development.*
    05:44 *Load `iris.csv` using pandas and display the first five rows to verify.*
    07:24 *Identify independent variables (sepal length, sepal width, petal length, petal width) and dependent variable (class).*
    09:13 *Split data into train and test sets; apply feature scaling on independent variables.*
    11:41 *Instantiate random forest classifier and fit it on training data.*
    13:19 *Create a pickle file of the model for later use in the Flask app.*
    15:37 *Verify the files: `model.py`, `model.pkl`, `index.html`, and `iris.csv`.*
    16:05 *Create `app.py` for the Flask application and import needed libraries.*
    17:56 *Load the previously created pickle model within the Flask app for making predictions.*
    19:07 *Define the homepage and prediction route for the Flask app.*
    21:11 *Convert received form values to float and then to numpy arrays for prediction.*
    23:51 *Return prediction results to be displayed on `index.html`.*
    25:42 *Run the Flask app and access it via the browser to input values and make predictions.*
    28:12 *Summary: Build ML model, create pickle file, set up Flask app, define prediction method, and ensure model deployment.*
    Made with HARPA AI

    • @StatsWire
      @StatsWire  4 หลายเดือนก่อน

      Thank you

  • @AbhishekKumar-xx7li
    @AbhishekKumar-xx7li 3 ปีที่แล้ว +3

    This is what I was looking for exactly

  • @shreyjain6447
    @shreyjain6447 3 ปีที่แล้ว +2

    I am performing the same steps for my model. My site is getting created but when in give values to all the features and click predict, it gives me error saying that:- "ValueError: Specifying the columns using strings is only supported for pandas DataFrames
    Traceback (most recent call last)". I have tried giving both float and int values to the features on the site but get the same error. Please help me!

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      Check if there are any missing values in the columns. Remove all missing values then follow all the steps you won't get this error

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      For a better page layout use the jinja template and CSS. You will get it online.

  • @pavanyenigi6252
    @pavanyenigi6252 3 ปีที่แล้ว +1

    Thanks, but I have a doubt, what if u have 2 models, and user can choose one of these model, give the input, how to do this, basically we will be having 2 pickle files

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      Yes, you are correct we will have two pickle files. You can put them on two different ports. if they are connected to each other like taking the output of the model and giving it as an input to the other model then we can make only one final pickle file.

  • @sonic-fan-play4817
    @sonic-fan-play4817 ปีที่แล้ว +1

    Could you please clarify this moment:
    '''return render_template("index.html",prediction_text = "The flower species is {}".format(prediction))'''
    format(prediction) - displays the results as list, but I need to display the results as a table having all elements written from a new line /n. Is there some way to do it with format() function?

  • @syedsajjadali4220
    @syedsajjadali4220 5 หลายเดือนก่อน

    Appreciate the efforts, thank you❤

    • @StatsWire
      @StatsWire  5 หลายเดือนก่อน

      You're welcome!

  • @gayanath009
    @gayanath009 10 หลายเดือนก่อน

    Thank you so much brother for the great explanation and amazing stuff. Best wishes to success you all work in all possible ways. 🤩 I was able to deploy it using VS Code.

    • @StatsWire
      @StatsWire  10 หลายเดือนก่อน

      Thank you for your kind words and lovely wishes!

  • @ddbshri
    @ddbshri 2 ปีที่แล้ว

    anaconda navigator also contain pycharm .. should we open that one ?? or should we have to install pycharm seperatly

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      I'm not sure but it has spyder I guess. We have to install pycharm separately.

  • @annyd3406
    @annyd3406 ปีที่แล้ว

    I am a newbie can u plzz tell me know what did actually request.forms.values() did in code on line no.17

    • @StatsWire
      @StatsWire  ปีที่แล้ว

      It is getting the values in that line

  • @RealNetSurfer
    @RealNetSurfer 4 หลายเดือนก่อน

    Thanks buddy. That helped me a lot.

    • @StatsWire
      @StatsWire  4 หลายเดือนก่อน

      Glad to hear it!

  • @mubinlikhon8960
    @mubinlikhon8960 8 หลายเดือนก่อน

    Thanks for the tutorial. Can I use this if my model takes one image and several numerical features and then predicts? I mean how to handle the image part

    • @StatsWire
      @StatsWire  8 หลายเดือนก่อน

      I have not tried it with image, but ideally it should work with some minimal changes.

  • @noobati
    @noobati 3 ปีที่แล้ว +2

    Thank you, you save my assignment! 😂

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      You're welcome :-)

  • @rajasekhar675
    @rajasekhar675 8 หลายเดือนก่อน

    can i use the same procedure for the model developed using jupyter notebook

    • @StatsWire
      @StatsWire  8 หลายเดือนก่อน

      Yes, it should work.

  • @okonvictor8711
    @okonvictor8711 2 ปีที่แล้ว

    How did handle you the user input to be transformed to standard scaler ?

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      Using standard scaler

    • @nirash8018
      @nirash8018 2 ปีที่แล้ว

      @@StatsWire No shit Sherlock

  • @sonic-fan-play4817
    @sonic-fan-play4817 ปีที่แล้ว

    Thanks. If I have categorical variables as X, how to handle them as predictors?

    • @StatsWire
      @StatsWire  ปีที่แล้ว

      You need convert it to numerical first.

  • @hudaibamushtaq5483
    @hudaibamushtaq5483 5 หลายเดือนก่อน +1

    thank you very helpful

    • @StatsWire
      @StatsWire  5 หลายเดือนก่อน

      You're welcome!

  • @orewaluffy-56
    @orewaluffy-56 3 ปีที่แล้ว +1

    Can You Please help me .
    Why am I getting this Error:
    ValueError: Number of features of the model must match the input. Model n_features is 132 and input n_features is 131

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      Because there is mismatch between number of features in training data and prediction data. Make sure you have same number of columns in both train and prediction dataset.

    • @orewaluffy-56
      @orewaluffy-56 3 ปีที่แล้ว +1

      @@StatsWire
      Thanks just now solved it out
      The issue was due to some reasons column name was inside trained model was different then name inside dataset

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว +1

      @@orewaluffy-56 Great you have solved the error on your own

  • @identicalgd2446
    @identicalgd2446 7 หลายเดือนก่อน

    how could I access the website through any device and how do I make the data I plug in to be able to be used to retrain the model

  • @ankitamore5025
    @ankitamore5025 2 ปีที่แล้ว

    Thank you so much, it helped me to deploy in easy manner.

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      You're welcome!

  • @MuhammadKaleemUllah-xh3lk
    @MuhammadKaleemUllah-xh3lk ปีที่แล้ว

    Very well explained. Good Job!

    • @StatsWire
      @StatsWire  ปีที่แล้ว

      Glad you liked it

  • @ddbshri
    @ddbshri 2 ปีที่แล้ว

    somewhere i read that there should be created a seperate environment for every project.. plz share link about the same (if you have already created the video on this issue) .

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว +1

      We can create a virtual environment also and then do the project. You can watch my video on pycaret installation where I've created a virtual environment.

    • @ddbshri
      @ddbshri 2 ปีที่แล้ว

      @@StatsWire thank you

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      @@ddbshri You're welcome

  • @vivekgupta1152
    @vivekgupta1152 3 ปีที่แล้ว

    VSCODE error while running app.py. DLL load failed while importing _multiarray_umath: The specified module could not be found.

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      It is due to the conda path, you have to add Python.CondaPath in settings. Press Ctrl + Shift + P and select Terminal Configuration. Search for python.conda, and paste your conda path for example. C:\ProgramData\Anaconda3\Scripts\conda.exe

  • @binarystar4947
    @binarystar4947 2 ปีที่แล้ว +1

    To the point video, thanks bro!

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      You're welcome

  • @orewaluffy-56
    @orewaluffy-56 3 ปีที่แล้ว +1

    I want to implement disease Prediction using symptoms
    In my Dataset I have 132 symptoms
    Can u suggest me something so that
    I can get 1 for selected symptoms and 0 for not selected symptoms

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      You can convert symptoms to 1 and 0 and then train your model

    • @orewaluffy-56
      @orewaluffy-56 3 ปีที่แล้ว

      @@StatsWire
      They are trained in 1 and 0 only
      But while talking inputs I am not able to understand how to do so

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      @@orewaluffy-56 You have to convert your input data also into 1 and 0 then pass to the model

  • @proxxy3933
    @proxxy3933 ปีที่แล้ว

    metadata-generation-failed. this error shows on installing sklearn . what to do?

    • @StatsWire
      @StatsWire  ปีที่แล้ว

      Please paste the exact error.

  • @anasthecianwankwo7929
    @anasthecianwankwo7929 ปีที่แล้ว

    Hello
    I was able to do exactly as was done in the tutorial with same data and all but when I try to open the link created I get error saying "template not found"
    Please what can I do to resolve this

    • @StatsWire
      @StatsWire  ปีที่แล้ว +1

      I guess you have not kept the HTML file in the correct location. Please check once.

  • @gracehim9154
    @gracehim9154 2 ปีที่แล้ว

    I want to know what happened to the feature scaling you did in the model.py
    How the data that i give will be scaled??

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      Those features will come on the same scale and it will give you stable results otherwise your results would not be stable if the features are on the different scales

    • @gracehim9154
      @gracehim9154 2 ปีที่แล้ว

      @@StatsWire let's say i am doing nlp.
      Where my words are going through all processes like stop word removal lemmatization, tfidf etc.
      How will these be applied to unseen data that i pass???

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      @@gracehim9154 You will have to pass your unseen data through all the steps you have done for the training data then only it will work. Like when you test your model that test data also goes through the same preprocessing steps along with the train data

  • @trymorencube8471
    @trymorencube8471 2 ปีที่แล้ว

    Good day bro.I have a model that i created using jupyter notebook .Which root should i take

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      Convert it to .py file and then you can follow all the steps.

  • @srigayathrijerusalem5291
    @srigayathrijerusalem5291 2 ปีที่แล้ว

    Got this error while loading the model
    Traceback (most recent call last):
    File "C:/ML Model Deployment/app.py", line 7, in
    model = pickle.load(open("model.pkl", "rb"))
    _pickle.UnpicklingError: invalid load key, 'A'.
    How to resolve. Please help

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      I think you did not pickle it correctly. Can you please try the steps again one by one and see if it still throws an error

    • @srigayathriarunachalam3370
      @srigayathriarunachalam3370 2 ปีที่แล้ว

      @@StatsWire tried multiple times sir still it throws the same error

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      @@srigayathriarunachalam3370 This error is related to the code in app.py file. For this, we need to examine the code written inside the app.py file.

  • @shreyasharma7987
    @shreyasharma7987 3 ปีที่แล้ว

    my ide is asking to register for the file type of model.pkl. how to resolve it?

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      Hi, can you please paste the error? So I can help you

  • @soumyopandey7974
    @soumyopandey7974 ปีที่แล้ว

    Thank u sir.... Good Lecture and very helpful......

    • @StatsWire
      @StatsWire  ปีที่แล้ว

      You're welcome!

  • @madhu1987ful
    @madhu1987ful 2 ปีที่แล้ว +1

    Please also elaborate on html file content n how are we migrating between different html pages

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      HTML is a different concept in itself that's why I did not go deeper into it but you can find online resources to understand the basics.

  • @anushaksatheesh
    @anushaksatheesh 8 หลายเดือนก่อน

    model.pkl is not created. why?

    • @StatsWire
      @StatsWire  8 หลายเดือนก่อน

      Can you please try it again from start. It should work.

  • @gaboceron100
    @gaboceron100 2 ปีที่แล้ว

    Thanks. Just one thing, I think you are missing the preprocessing for the prediction part.

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      You're welcome. Yeah, that can be done. You can experiment with many more things.

  • @abhishekkumaragrawal1372
    @abhishekkumaragrawal1372 3 ปีที่แล้ว

    do we have to write something in "index.html"

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      It has HTML codes already written. You can download it from my github repository and use it. But if you want to add something extra then you can edit the index.html file

    • @abhishekkumaragrawal1372
      @abhishekkumaragrawal1372 3 ปีที่แล้ว

      @@StatsWire thanks a lot

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      @@abhishekkumaragrawal1372 you're welcome

  • @afeezlawal5167
    @afeezlawal5167 2 ปีที่แล้ว +1

    Really learnt from this.
    But one thing sir, during the prediction stage, u only converted to float but you didn't use standardScaler on the prediction variables as you have done for the training set.Hope this won't affect the answer?

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      Thank you, it would be good if you apply the same scaler object that you used to fit on the training data on unseen data you will get better results

    • @afeezlawal5167
      @afeezlawal5167 2 ปีที่แล้ว

      Thanks for the quick reply.
      That is the problem here sir, How do I apply it sir? + let's say during the training, we did some feature extraction like onehotencoding, how can we apply it to the unseen data?
      Between, can you drop ur mail?
      THANKS.

    • @afeezlawal5167
      @afeezlawal5167 2 ปีที่แล้ว

      @@StatsWire ., Please I need a reply to the above comment sir

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      You'll have to store (i.e. pickle) your fitted LabelEncoders and OneHotEncoder. When you receive new data, you'll transform them via the already-fitted LabelEncoders and OneHotEncoder and then use your trained model to make the predictions. This way, the produced data will be in the exact format your models expects them to be

  • @tejassutar4198
    @tejassutar4198 3 ปีที่แล้ว

    Wonderful Explaination.

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      ! am glad you liked it! Thank you

  • @shubhamsd100
    @shubhamsd100 3 ปีที่แล้ว

    Thank you for a wonderful explanation!

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      I am glad you liked it!

  • @ghazifkiri-f8l
    @ghazifkiri-f8l 9 หลายเดือนก่อน

    thank you Sir, Is this method also applicable in the domain of deep learning ?

    • @StatsWire
      @StatsWire  9 หลายเดือนก่อน

      Yes, it is.

  • @muhammadazlaanzubair5426
    @muhammadazlaanzubair5426 ปีที่แล้ว

    where was the deployment section ?

    • @StatsWire
      @StatsWire  ปีที่แล้ว

      It is in the same video

  • @vvssaikirankolli6886
    @vvssaikirankolli6886 2 ปีที่แล้ว

    I have got the jinja2.exceptions.TemplateNotFound error

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      Have you imported flask?

    • @manasiraut8091
      @manasiraut8091 8 หลายเดือนก่อน

      @@StatsWire even i have got the same error. i have imported flask

    • @StatsWire
      @StatsWire  8 หลายเดือนก่อน

      @@manasiraut8091 can you paste the exact error?

  • @UniUno-ov6rk
    @UniUno-ov6rk ปีที่แล้ว

    why the web can't be reached sir?

    • @StatsWire
      @StatsWire  ปีที่แล้ว

      Maybe some problem with your port. Please try again.

  • @nikithakaluvakolanu3866
    @nikithakaluvakolanu3866 2 ปีที่แล้ว

    how did u get that .csv file?

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      You can find code and csv file here: github.com/siddiquiamir/ML-MODEL-DEPLOYMENT-USING-FLASK

  • @nikitakhachane6405
    @nikitakhachane6405 3 ปีที่แล้ว +2

    you are a life saver,,,thanks a lot. it was really helpful :)

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      You're welcome:)

  • @apnaadda73
    @apnaadda73 ปีที่แล้ว

    Internal Server Error
    The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
    This is what im getting after running on web. plz hepl me sir with this issue

  • @Anilverma-ls2cl
    @Anilverma-ls2cl 7 หลายเดือนก่อน

    Can we use jupyter notebook

    • @StatsWire
      @StatsWire  7 หลายเดือนก่อน

      It will be difficult to maintain all the files

  • @harimachavrapu2622
    @harimachavrapu2622 2 ปีที่แล้ว

    hi can u explain how we will deploy wordcloud model

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว +1

      Hello, you can create an object of that word cloud model, make an HTML file, and then deploy it. You will have to make changes in the HTML.

  • @ravikirankonda6966
    @ravikirankonda6966 3 ปีที่แล้ว

    I was getting this error
    "ValueError: X has 4 features, but DecisionTreeClassifier is expecting 3 features as input."

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      Because after training the model using on 3 features you are passing 4 features for prediction. Please see if you are passing only 3 variables. Go through the code again it's a minor error you will be able to correct it.

  • @samkelosibongakonke5003
    @samkelosibongakonke5003 2 ปีที่แล้ว

    This was very helpful thank you

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      Glad it was helpful!

  • @oushnik
    @oushnik 2 ปีที่แล้ว

    AttributeError: 'DecisionTreeClassifier' object has no attribute 'n_features_' I'm getting this error when I'm trying to run my app.py file. But thing is that I've saved the model that is RandomForestClassifier. So what is the error can u please help me. and thanks for your video. it makes easier to me to understand the whole code in Flask. Please help me with that error. thanks in advance.

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      Hello! DecisionTreeClassifier doesn't have such a method indeed.

  • @mazharalamsiddiqui6904
    @mazharalamsiddiqui6904 3 ปีที่แล้ว +1

    Very nice tutorial

  • @sivasundarvijaivijai4039
    @sivasundarvijaivijai4039 5 หลายเดือนก่อน

    Very good video sir. Thank You . I have one doubt templates folder how to make sir

    • @StatsWire
      @StatsWire  5 หลายเดือนก่อน

      Please let me know

  • @laxminarayangaidhane7116
    @laxminarayangaidhane7116 2 ปีที่แล้ว

    No words only ❤

  • @saquibshaikh4575
    @saquibshaikh4575 2 ปีที่แล้ว

    This is very help full for me

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      I'm glad you liked it. Thank you for your comment :-)

  • @aa4734
    @aa4734 3 ปีที่แล้ว +4

    Hi sir,
    1) please do let me know how to create a html of ml
    2) this deployment is on local machine,please advise how to deploy on cloud like gcp,azure,aws..
    3) please also send any links related to other projects for practice.
    Thank you very much for your valuable information 😀....thanks & Regards

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      Hi
      1) To create more beautiful html of ml you have to use jinja. This is the link jinja.palletsprojects.com/en/3.0.x/
      2) You can deploy on cloud very easily, it's almost same you just need to create an account on heroku or aws. If you are comfortable with flask then you can deploy anywhere on cloud or azure, aws etc
      3) You should also look at this video to know you can test on on postman. This is the video link: th-cam.com/video/HxLm-kZlXgU/w-d-xo.html

    • @aa4734
      @aa4734 3 ปีที่แล้ว

      @@StatsWire thank you vvv much sir, ...plz do an example with Google cloud platform it will be really appreciable.thanks and regards

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      @@aa4734 Sure, I will make a video soon. Thank you for the great suggestion.

  • @umarfaruk-bq3qg
    @umarfaruk-bq3qg 3 ปีที่แล้ว

    Good video bro but my model has both string and float variables then how to perform flask code plz help me
    Thanks in advance

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว +1

      No problem even my model has both string and float you just have to first convert to one-hot encoding in machine learning, and in flask, I have converted it into float so you will not face any problem. Just follow the steps. You can see it here in app.py "float_features = [float(x) for x in request.form.values()]" we are converting all features into float. Do not worry just follow the steps.

    • @umarfaruk-bq3qg
      @umarfaruk-bq3qg 3 ปีที่แล้ว

      @@StatsWire can you please provide ur code if it is in github 😊

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      @@umarfaruk-bq3qg Sure, this is the code link
      github.com/siddiquiamir/ML-MODEL-DEPLOYMENT-USING-FLASK

    • @umarfaruk-bq3qg
      @umarfaruk-bq3qg 3 ปีที่แล้ว

      @@StatsWire In this are u use one hot encoding bro?
      By doing my app. py like this I get
      value error: could not convert string to float :'Year'
      Can u plz help me
      Thanks in advance

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว +1

      First convert Year into int type in your model.py by typecasting for ex df["Year"] = int(df["Year"]) once you do that in app.py it will automatically convert this into float using the below function
      float_features = [float(x) for x in request.form.values()]

  • @zeeemzam7396
    @zeeemzam7396 3 ปีที่แล้ว

    I'm currently working on ML project on the topic of "Animal endangered species prediction"..but I'm don't know how to collect datasets for this
    So, can you sir please guide me in the dataset part please..?!!!
    Hope you will help me!!
    Waiting for ur reply

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      Hi Harini, you can get the dataset online. You can find it on Kaggle or UCI
      UCI: archive.ics.uci.edu/ml/index.php
      Kaggle: www.kaggle.com

  • @PawanSharma-jh4hr
    @PawanSharma-jh4hr 2 ปีที่แล้ว

    Hi Sir...Hi I'm deploying my first ML model using flask. I did exactly the same you explained in the video but when I'm trying to run app.py file using Spyder, it's saying "Restarting with windowsapi reloader" repetedely and not giving me the url. Please help

    • @FatimaSharif-bo8gr
      @FatimaSharif-bo8gr 6 หลายเดือนก่อน

      same problem i am facing, have you rectified yours please?

  • @YashNagayach
    @YashNagayach 3 ปีที่แล้ว

    Informative 👍

  • @Mr_nawab54_786
    @Mr_nawab54_786 2 ปีที่แล้ว +1

    Nice video

  • @rangarajsingaravelu5594
    @rangarajsingaravelu5594 2 ปีที่แล้ว +2

    * Serving Flask app "__main__" (lazy loading)
    * Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
    * Debug mode: on
    * Restarting with watchdog (windowsapi)
    An exception has occurred, use %tb to see the full traceback.
    SystemExit: 1

    • @nishkarshnagle3363
      @nishkarshnagle3363 ปีที่แล้ว

      Maybe you are using it in jupyter file like .ipynb , try using same code in .py file

  • @rangarajsingaravelu5594
    @rangarajsingaravelu5594 2 ปีที่แล้ว

    while running the app i getting following error

  • @jojosharma635
    @jojosharma635 ปีที่แล้ว

    Thank a lot Sir!!!

    • @StatsWire
      @StatsWire  ปีที่แล้ว

      You're welcome!

  • @dishacutinha
    @dishacutinha 4 หลายเดือนก่อน

    Thank you

    • @StatsWire
      @StatsWire  4 หลายเดือนก่อน

      You're welcome!

  • @krentwhite2668
    @krentwhite2668 3 ปีที่แล้ว

    can you give that git repository link

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว +1

      Yes, I have just updated the github link. Please go on this link to download the code.
      github.com/siddiquiamir/ML-MODEL-DEPLOYMENT-USING-FLASK

    • @krentwhite2668
      @krentwhite2668 3 ปีที่แล้ว

      Thanks buddy🤗

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว +1

      @@krentwhite2668 You're welcome. A new video is coming today, how to test your model using postman after deploying on flask

    • @krentwhite2668
      @krentwhite2668 3 ปีที่แล้ว

      you are awesome dude! keep it up... we will support🔥🔥🔥

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว +1

      @@krentwhite2668 Thank you

  • @ssnayakmusic
    @ssnayakmusic 3 ปีที่แล้ว

    Thank you so much Sir.

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      You're welcome Susanth

    • @ssnayakmusic
      @ssnayakmusic 3 ปีที่แล้ว

      Sir . I could create virtual environment using conda in the command prompt , but not able to integrate it with pPycharm. Could you please help me Sir ?

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      @@ssnayakmusic I think you should not face any problem. Can you tell what errors are you getting? May be I can refer you some videos based on that

  • @DHUSHYANTHRAVICHANDRAN
    @DHUSHYANTHRAVICHANDRAN 9 หลายเดือนก่อน

    in which hosting website can we host

    • @StatsWire
      @StatsWire  9 หลายเดือนก่อน

      That depends where you want to host it. Mostly people host it locally.

  • @rohitkamble8515
    @rohitkamble8515 2 ปีที่แล้ว

    Thanks 🙏

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      You're welcome

  • @surendragupta1656
    @surendragupta1656 2 ปีที่แล้ว

    Dear Sir, Thank you very much for the video. It is really good. One small request, instead of printing the final decision, can you please provide details on how to return the probabilities for each class for given input values

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว +1

      HI, yes, we can print probabilites. You can use this function predict_proba

  • @mydell179
    @mydell179 2 ปีที่แล้ว

    bro pls make a video for deployment with heroku

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      Thank you for the suggestion. I will make it soon.

  • @riyazbagban9190
    @riyazbagban9190 2 ปีที่แล้ว

    how to create html file sir

    • @StatsWire
      @StatsWire  2 ปีที่แล้ว

      It's very easy. You can write code in any IDE like sublime text and just write the file extension as .html that's it

  • @harshalchaudhariflute1832
    @harshalchaudhariflute1832 3 ปีที่แล้ว

    Thanks a lot

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว

      You're welcome

  • @superfreiheit1
    @superfreiheit1 2 หลายเดือนก่อน

    awesome video, but please make the code are bigger. hard to see

    • @StatsWire
      @StatsWire  หลายเดือนก่อน

      Ok next time

  • @davidobembe5302
    @davidobembe5302 3 ปีที่แล้ว

    Great video but I was straining my eyes to see your screen. Fonts were too small and it was really dark

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว +1

      Sorry to hear that, I should have increased the font size I realized after reading your comment. Thanks for the constructive feedback, I will keep that in mind in future videos, and make good ones. I have posted the PyCharm code link please go and download it from GitHub, so you can see it on your system and change the font size as well as the dark theme to light one. Thank you again for the great feedback.

    • @davidobembe5302
      @davidobembe5302 3 ปีที่แล้ว

      Thanks a lot. It was not too bad though. I just had to put the video in full screen to be able to follow. Really informative video and clear explanations 👍

    • @StatsWire
      @StatsWire  3 ปีที่แล้ว +1

      @@davidobembe5302 Thank you for the feedback. I appreciate it.

  • @spandanaMaddi
    @spandanaMaddi 15 วันที่ผ่านมา

    Will you please send me abstract

  • @FatimaSharif-bo8gr
    @FatimaSharif-bo8gr 6 หลายเดือนก่อน

    Hello Sir... I find this video very educative while following the video and trying,i encountered an error in the app.py. the error says "Traceback (most recent call last):
    File "C:\ML Model Deployment\app.py", line 10, in
    model = pickle.load(open("model.pkl", "rb"))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    EOFError: Ran out of input
    "
    i wanted to see how your model.pkl file is but unfortunately i couldn't because it's not opening, and i noticed that my model.pkl file has nothing in it
    Sir if you can help me solve this problem i will really appreciate
    Thank you!

    • @StatsWire
      @StatsWire  6 หลายเดือนก่อน

      Can you check step by step where the problem is coming.

    • @FatimaSharif-bo8gr
      @FatimaSharif-bo8gr 6 หลายเดือนก่อน

      I did check Sir, but i can’t seem to find any problem

  • @aayush6449
    @aayush6449 หลายเดือนก่อน

    import pandas as pd
    # Replace 'Iris.xlsx' with the exact file name and extension
    file_path = "Iris.xlsx" # For Excel file
    # file_path = "Iris.csv" # Uncomment if it's a CSV file
    try:
    if file_path.endswith('.xlsx'):
    data = pd.read_excel(file_path)
    elif file_path.endswith('.csv'):
    data = pd.read_csv(file_path)
    else:
    raise ValueError("Unsupported file format. Use .csv or .xlsx.")
    print("Dataset loaded successfully:")
    print(data.head()) # Display the first few rows
    except FileNotFoundError:
    print(f"File '{file_path}' not found. Check the file name and location.")
    except Exception as e:
    print(f"An error occurred: {e}")

    • @StatsWire
      @StatsWire  29 วันที่ผ่านมา

      Please provide the correct file name