Deploy Machine Learning Model Flask

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

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

  • @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 5 месяцев назад +2

    🎯 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

  • @AbhishekKumar-xx7li
    @AbhishekKumar-xx7li 3 года назад +3

    This is what I was looking for exactly

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

    Thank you, you save my assignment! 😂

  • @gayanath009
    @gayanath009 11 месяцев назад +1

    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  11 месяцев назад

      Thank you for your kind words and lovely wishes!

  • @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?

  • @shreyjain6447
    @shreyjain6447 3 года назад +3

    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.

  • @RealNetSurfer
    @RealNetSurfer 5 месяцев назад

    Thanks buddy. That helped me a lot.

    • @StatsWire
      @StatsWire  5 месяцев назад

      Glad to hear it!

  • @Mr_nawab54_786
    @Mr_nawab54_786 2 года назад +1

    Nice video

  • @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.

  • @mubinlikhon8960
    @mubinlikhon8960 9 месяцев назад

    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  9 месяцев назад

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

  • @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.

  • @syedsajjadali4220
    @syedsajjadali4220 6 месяцев назад

    Appreciate the efforts, thank you❤

    • @StatsWire
      @StatsWire  6 месяцев назад

      You're welcome!

  • @hudaibamushtaq5483
    @hudaibamushtaq5483 6 месяцев назад +1

    thank you very helpful

    • @StatsWire
      @StatsWire  6 месяцев назад

      You're welcome!

  • @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.

  • @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

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

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

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

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

  • @identicalgd2446
    @identicalgd2446 8 месяцев назад

    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

  • @MuhammadKaleemUllah-xh3lk
    @MuhammadKaleemUllah-xh3lk 2 года назад

    Very well explained. Good Job!

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

    Very nice tutorial

  • @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

  • @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.

  • @binarystar4947
    @binarystar4947 2 года назад +1

    To the point video, thanks bro!

  • @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.

  • @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

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

    Wonderful Explaination.

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

      ! am glad you liked it! Thank you

  • @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

  • @rajasekhar675
    @rajasekhar675 9 месяцев назад

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

    • @StatsWire
      @StatsWire  9 месяцев назад

      Yes, it should work.

  • @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

  • @nithyarajan7317
    @nithyarajan7317 20 дней назад

    What is that index.html file that you used

    • @StatsWire
      @StatsWire  3 дня назад

      It has html code that is used on the website for UI.

  • @ghazifkiri-f8l
    @ghazifkiri-f8l 11 месяцев назад

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

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

    This was very helpful thank you

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

      Glad it was helpful!

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

    This is very help full for me

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

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

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

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

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

      Please paste the exact error.

  • @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

  • @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.

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

    Thank you for a wonderful explanation!

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

      I am glad you liked it!

  • @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

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

    Informative 👍

  • @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

  • @sivasundarvijaivijai4039
    @sivasundarvijaivijai4039 6 месяцев назад

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

    • @StatsWire
      @StatsWire  6 месяцев назад

      Please let me know

  • @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

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

    where was the deployment section ?

  • @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.

  • @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

  • @UniUno-ov6rk
    @UniUno-ov6rk Год назад

    why the web can't be reached sir?

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

      Maybe some problem with your port. Please try again.

  • @Anilverma-ls2cl
    @Anilverma-ls2cl 9 месяцев назад

    Can we use jupyter notebook

    • @StatsWire
      @StatsWire  8 месяцев назад

      It will be difficult to maintain all the files

  • @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.

  • @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.

  • @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 :)

  • @anushaksatheesh
    @anushaksatheesh 9 месяцев назад

    model.pkl is not created. why?

    • @StatsWire
      @StatsWire  9 месяцев назад

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

  • @superfreiheit1
    @superfreiheit1 3 месяца назад

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

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

    Thank a lot Sir!!!

  • @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

  • @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

  • @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

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

    Thanks 🙏

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

    I have got the jinja2.exceptions.TemplateNotFound error

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

      Have you imported flask?

    • @manasiraut8091
      @manasiraut8091 9 месяцев назад

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

    • @StatsWire
      @StatsWire  9 месяцев назад

      @@manasiraut8091 can you paste the exact error?

  • @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

  • @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.

  • @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 7 месяцев назад

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

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

    while running the app i getting following error

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

    No words only ❤

  • @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.

  • @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: ruclips.net/video/HxLm-kZlXgU/видео.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()]

  • @dishacutinha
    @dishacutinha 5 месяцев назад

    Thank you

    • @StatsWire
      @StatsWire  5 месяцев назад

      You're welcome!

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

    Thanks a lot

  • @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

  • @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.

  • @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

  • @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

  • @DHUSHYANTHRAVICHANDRAN
    @DHUSHYANTHRAVICHANDRAN 10 месяцев назад

    in which hosting website can we host

    • @StatsWire
      @StatsWire  10 месяцев назад

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

  • @spandanaMaddi
    @spandanaMaddi Месяц назад

    Will you please send me abstract

    • @StatsWire
      @StatsWire  3 дня назад

      Sorry I did not get it.

  • @FatimaSharif-bo8gr
    @FatimaSharif-bo8gr 7 месяцев назад

    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  7 месяцев назад

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

    • @FatimaSharif-bo8gr
      @FatimaSharif-bo8gr 7 месяцев назад

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

  • @aayush6449
    @aayush6449 2 месяца назад

    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  2 месяца назад

      Please provide the correct file name