Build A Machine Learning Web App From Scratch

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

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

  • @patloeber
    @patloeber  3 года назад +60

    If you follow this tutorial you have a great portfolio project for your resume: It shows working with real world data and putting it into a ML web app that visualizes the results. Hope you enjoy it :)

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

      Hello Patrick, you are treally amazing.. i do have faculty project that i cant solve. that is face recognition using CNN's, and integrating it into django web app,, i am ''junior'' so it is really big step for me.. so if you could help with anything it would be great.. Ty kind sir :)

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

      I am unable to solve an error in the 78th code box of your jupytor notebook which gives me the error:- first line:-"y contains previously unseen labels: 'United States" "
      2nd line:- " y contains previously unseen labels: '2' " . I am unable to find a solution to this error, it would be of great help if anyone could guide me. THANKS😊

    • @Saffron_SV
      @Saffron_SV Год назад +1

      @@prajwalbagchi3965 check the label must be changed to 'United States of America'... and for checking write this code df["Country'].unique()

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

      ​​@patloeber hello sir I need to ask u some thing in the 10th cell what is the use of filtering the Employment column if ur gonna drop it in the next line it self 🤔 12:36

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

      ​@Saffron_SV Thank you for this, I was also stuck here for days

  • @gabrielalopezgutierrez8871
    @gabrielalopezgutierrez8871 Год назад +18

    This is exactly what you are looking for if you are a junior data scientist who just started a web app project. Incredibly simple and yet complex intro.

  • @shishirrd
    @shishirrd 3 года назад +19

    This was fantastic! I built my first Python web app using exclusively this tutorial. Thank you, Python Engineer.

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

      Great to hear!

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

      hey what should I include in .pkl file?

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

      @@patloeber Is this annual salary?

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

      ​@@patloeber hello sir I need to ask u some thing in the 10th cell what is the use of filtering the Employment column if ur gonna drop it in the next line it self 🤔 12:36

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

      ​@@patloeber​​ hello sir I need to ask u some thing in the 10th cell what is the use of filtering the Employment column if ur gonna drop it in the next line it self 🤔 12:36

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

    As I said previously I was probably within your first 1k subscribers and man I just love watching you go at these in the zone! Great content relevant no fluff just keep going love it

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

    This is awesome. Could you create a tutorial on how to build a web app which can identify an image deployed on google cloud. One of the best ML channels. Pure Gold.

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

      Thanks! Watch my latest tutorial, it's about Google Cloud deployment ;)

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

    I'll come to this, your teaching made me think about starting to learn streamlit

  • @narasa12
    @narasa12 3 месяца назад +1

    Excellent video, thank you so much for sharing this!!!

  • @gabrielferreira4018
    @gabrielferreira4018 24 дня назад

    What a great tutorial! Thanks for sharing this!!

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

    @Patrick Loeber Hola!!! :) greetings from Argentina, excellent video and explanation, please continue doing them

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

    Omg thanks you soo soo so much, because I was in college try Harding to understand the concept of machine learning. Got to learn so much. Like the concept of : data cleansing, data training fitting, how to use trained AI to make prediction. Your explanation is just mind blowing. I did this project and on top added my own touch which I would've never done if were to just to try to learn from College alone.

  • @Mike-jr7re
    @Mike-jr7re 2 года назад

    What a maestro! Keep your great work, man. Really appreciate this high quality stuff!

  • @tecnom7133
    @tecnom7133 10 месяцев назад +1

    Thanks man , waiting for more

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

    Thank you,this project actually works.Much appreciationn😇

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

    Niceee... web dev with ML

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

      Yep great combination :) Maybe one day I'll make a Django+ML project

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

      @@patloeber that'll be great!

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

    Good explanation. Thanks for sharing

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

    Amazing video bro!!!! Thanks so much for sharing your knowledge

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

    i really enjoy the tutorial, thanks sir.

  • @ashanbandaranayeke9344
    @ashanbandaranayeke9344 7 месяцев назад

    Thanks Patrick! Was a lovely tutorial and guessing the frame can be used to design other linear regression apps easily (and other models with a little bit of work).

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

    This was amazing!! Thanks for this tutorial, loved it

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

    Hi! Shouldn't the label encoder transformers need to be used only in the target variables? But in this video you are using it for the input variables too. Correct me if I'm wrong.

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

    Thanks, this was very helpful!

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

      can you tell me why this is incorrect ??
      X[:, 0] = le_country.transform(X[:,0])
      X[:, 1] = le_education.transform(X[:,1])
      X = X.astype(float)
      X

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

    It's nice to see you in this video bro......nice video too..bro..keep going 🔥🔥🔥

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

    Thanks a lot it was detailed enough to help!

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

    WOOOOOOOOOOOWWWWWWWWWWWWWWWWWWWWWW!!!!!!!!
    YOU ARE GREAT! STREAMLIT ALSO AWESOME! IT MAKES EASIER TO LIVE :D

  • @sadie-je4dl
    @sadie-je4dl 9 месяцев назад

    Awesome explanation.

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

    This is amazing! Thanks for sharing

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

    Cool. Added to my watchlist.

  • @m-adem
    @m-adem 2 года назад

    Thank You 🙌
    You Are My Hero 💖

  • @luckychitundu1070
    @luckychitundu1070 Год назад +1

    Great work

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

    this is awesome! Thank you

  • @placidaorlunwo5012
    @placidaorlunwo5012 2 года назад +2

    I have three categorical data types and my confusion is on how to implement them given that this section of the code has just a two-dimensional array.
    ok = st.button("Calculate Salary")
    if ok:
    X = np.array([[country, education, expericence ]])
    X[:, 0] = le_country.transform(X[:,0])
    X[:, 1] = le_education.transform(X[:,1])
    X = X.astype(float)

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

      This is related to the `LabelEncoder`:
      # Your DataFrame processing should look like this:
      le_education = LabelEncoder()
      df['EdLevel'] = le_education.fit_transform(df['EdLevel'])
      le_country = LabelEncoder()
      df['Country'] = le_country.fit_transform(df['Country'])
      # Prepare your feature matrix `X` and target vector `y`
      X = df.drop("Salary", axis=1)
      y = df["Salary"]
      Then you can go ahead and follow him at 21:42. Quick reminder that I am using a dataset from 2023, so in my Decision Tree Regressor, I needed to change the "United States of America" it is like:
      # Correct the country and education level based on how they were encoded
      new_data = [["United States of America", "Master’s degree", 15]]
      # Create a DataFrame for the new data point for easy manipulation
      new_data_df = pd.DataFrame(new_data, columns=["Country", "EdLevel", "YearsCodePro"])
      # Apply the trained LabelEncoders to the new data
      new_data_df['Country'] = le_country.transform(new_data_df['Country'])
      new_data_df['EdLevel'] = le_education.transform(new_data_df['EdLevel'])
      # Ensure all data is in the correct numeric format
      new_data_df = new_data_df.astype(float)
      I hope it helps.

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

    such a good video. Thanks for sharing bro

  • @karthikb.s.k.4486
    @karthikb.s.k.4486 3 года назад +6

    Nice can you also do interaction of FAST API with streamlit for this ML problem. Thank you

  • @techcompany_
    @techcompany_ 9 месяцев назад +1

    How we can calculate accuracy of above project??

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

    Really awesome tutorial
    Thanks for this one, it helped a lot

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

    What an awesome tutorial.

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

    Great tut and great accent

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

    Really thanks for this project , i have question please , on sidebar explore and predict the visualizations appeared on both of them .
    How can i solve that .

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

    from sklearn import linear_model
    linear_reg = linear_model.LinearRegression()

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

    Awesome content 🙂👍

  • @blogactivities5462
    @blogactivities5462 7 месяцев назад

    thank you Patrick

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

    Great tutorial, however in which step shall I add a streaming source datasets instead of the static one which you have presented here ? Best

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

    Excellent video!!!

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

      Glad you liked it!

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

    @patloeber, what if do the label encoding in for loop ,what should i do after importing the model

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

    This is a helpful tutorial. Thank you. Can you also make a video on Interactions between different charts using streamlit? This will be useful to many(like me) I guess👍🏻

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

      i'll have a look at it

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

      You prolly dont care but if you are bored like me atm then you can watch all of the latest movies on InstaFlixxer. Have been watching with my gf during the lockdown :)

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

      @Jax Samir yea, been using instaflixxer for since november myself =)

  • @divyansxii-b1677
    @divyansxii-b1677 5 месяцев назад

    which type of dataset is this? supervised or non - supervised or semi supervised?

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

    Huge perfect and get new skill . Thank you.

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

    Great material! Would you mind making a future video on other data preprocessing/cleaning techniques? Would be great to systematize an approach.

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

      yeah I want to do this in the future

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

    Awesome
    Can you please make more videos on it. It's a request.

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

      thanks for the feedback! I try :)

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

    can you show how you deployed it coz i am having issue while deploying it

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

    Even after using terminal to install scikit learn jupyter does not detect it and says no module named sklearn?

  • @sireode
    @sireode 7 месяцев назад

    When I recreated this app, when I predict based on Bachelor’s degree, the salary predicts well. But when I predict based on "Post grad " select, the salary prediction is not accurate. On zero experience, i get a a higher salary than when I have one year experience. This also applicable to the other selections. Only Bachelor’s degree select predicts well. Is this as a result of the outlier?

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

    Thanks sir. Can you share the video how to published this kind of local data into github/ webapps that can be use by anyone in the world as apps/ web gui.

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

    THANK YOU SO MUCH SIR!

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

    Great Video

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

    Hello Sir, I had face a problem during practice regressor problem. I don't understand how to solve a problem ! (regressor is not defined)

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

    Why you used label encoder for country column ?. I think we have to use one hot encoder because it is nominal data.

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

    Great! Looking for more like this. Thanks.

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

      Glad you liked it!

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

    you used label encoder and gave that value, but what if we did one hot encoding, then how will we implement that in streamlit ?

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

    Hey @Patrick Loeber can you provide the dataset of this project???

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

    How do we change the styling and structure of the web application as in HTML and CSS?

  • @ShonMarsh-yv6pz
    @ShonMarsh-yv6pz 4 месяца назад

    why not build pipeline for automating data preparation for prediction

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

    This is amazing!!

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

    awesome as always :-)

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

    I like the way you set up the iterm2. Can you make a video how you set up that?

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

      I pretty much followed this article: opensource.com/article/20/8/iterm2-zsh

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

    A truly masterpeace

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

    I am trying to deploy on streamlit cloud but throwing some weird error I guess I am using wrong versions in requirements.txt.Kindly let me know which version to be installed

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

    whenever i try to import streamlit as st it always shows error stating "import streamlit could not be resolvedpylancereportmissingimports" any idea what the issue can be? should i open vs code from the comman prompt that im using conda for ?

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

    sir u haven't given the pkl file?

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

    Great video! Can you explain from where you saved the pickle file and deployed the model? I am trying with 14 variables but I dont want to make prediction using all of them. How would that be possible?

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

    Awesome !

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

    can we build a ML project using jupyter Notebook? if yes how can i deploye on web app?

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

    Can we consider this prediction as Real Time prediction?

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

    You're a Gem !

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

    I can't understand one thing, how did you select those columns without any correlation?

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

    KING 👑

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

    Nice video, thanks :)

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

    Really good project.

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

    i keep getting an error implementing the pickle library using all you used in this tutorial

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

    How do we deploy the data so we can share it publicly with everybody

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

    No such file or directory: 'saved_steps.pkl' please help

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

    Thank you

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

    How to use machine learning model (pickle / jooblib ) and make Graphs and log in /register and house price Prediction in django

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

    We want more videos like this..plzzz

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

    Thank you very much. I learnt a lot following this tutorial. You are amazing.

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

      glad it was helpful!

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

    PERFECT!

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

    Great material! What could be done to achieve a lower error ? That one obtained seems too big, don’t you think?

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

      yeah it's not optimal, you can try different features, feature selection methods, normalization etc...and of course different models and optimize the hyperparameters

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

    Can you make a video on how to make front end using react instead of streamlit . Thanks

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

    How well will this scale?

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

    Awesome.

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

    magnificent!

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

    I ran into a problem. After creating the drop-down, whenever I select a list, the whole entire thing disappears.

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

    where we collect the data set

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

    can you tell me which machine learning algorithm is used in this code

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

      LinearRegression and RandomForestRegressor

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

      @@patloeber thank you so much can u tell me specifically where each is used

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

    data = pickle.load(file)
    _pickle.UnpicklingError: invalid load key, '?'.
    can anyone help me out with this error?

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

    is it possible to send the link someone? or it's working only local?

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

    Thank you so much can you do fingerprint matching web ?

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

    how to create a conda environment?

  • @alvarob15
    @alvarob15 2 года назад +2

    Error:
    X[:, 0] = le_country.transform(X[:,0])
    X[:, 1] = le_education.transform(X[:,1])
    X = X.astype(int)
    X
    ValueError: y contains previously unseen labels: 'United States'
    Solution: change 'United States' to 'United States of America', seem like the CSV dataset updated.

    • @mohamedbarakat9908
      @mohamedbarakat9908 Год назад +1

      it keeps telling me " name 'le_country' is not defined "
      plz help

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

      This is related to the `LabelEncoder`:
      # Your DataFrame processing should look like this:
      le_education = LabelEncoder()
      df['EdLevel'] = le_education.fit_transform(df['EdLevel'])
      le_country = LabelEncoder()
      df['Country'] = le_country.fit_transform(df['Country'])
      # Prepare your feature matrix `X` and target vector `y`
      X = df.drop("Salary", axis=1)
      y = df["Salary"]
      Then you can go ahead and follow him at 21:42. Quick reminder that I am using a dataset from 2023, so in my Decision Tree Regressor, I needed to change the "United States of America" it is like:
      # Correct the country and education level based on how they were encoded
      new_data = [["United States of America", "Master’s degree", 15]]
      # Create a DataFrame for the new data point for easy manipulation
      new_data_df = pd.DataFrame(new_data, columns=["Country", "EdLevel", "YearsCodePro"])
      # Apply the trained LabelEncoders to the new data
      new_data_df['Country'] = le_country.transform(new_data_df['Country'])
      new_data_df['EdLevel'] = le_education.transform(new_data_df['EdLevel'])
      # Ensure all data is in the correct numeric format
      new_data_df = new_data_df.astype(float)
      I hope it helps.

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

    hello please i keep getting error when i load streamlit. Please help me i neede it urgently