Deploy Machine Learning Models using Flask

Link to code: github.com/JayMehtaUK/image-c...
In this tutorial you will learn how to deploy an ML model with python using Flask. This will allow users to interact with your model via http requests. In this example I've built a basic page where a user can upload an image and then it will return information about what animal is in the image.
If you are new to using HTML then check out this video:
• Video
Chapters:
00:00 Introduction & Demo
01:00 Getting started with Flask
03:31 Flask Templates
05:58 Allowing user input
10:43 Adding the ML Model

Пікірлер: 82

  • @Jay-oc7mc
    @Jay-oc7mc3 жыл бұрын

    If you're interested in learning how to get this Flask app onto the cloud I made another tutorial about how to deploy this to Heroku. Heroku is a PaaS which means you don't need to look after the underlying hardware which is pretty cool. You just push your code to their platform and now it will be hosted! kzread.info/dash/bejne/lmV4rbZrqM7FlLA.html

  • @omrajgure8441
    @omrajgure84413 жыл бұрын

    bro literally i was struggeling from 3-4 days and i am glad that you helped me out i was getting frustated as everyone here on YT not showing the model deployment from scratch they are only doing one thing and that is just giving brief about flask. Thank you soooooo much bro.....you gain a subscriber and you deserve millions of subscriber keep it up and nevere ever give up

  • @chandansarkar1618
    @chandansarkar16183 жыл бұрын

    Hi, this video was really helpful for beginners. You avoided unnecessary complexities and tried to stick to the main topic. Very useful as a quick reference.

  • @abdelmalekdjamaa7691
    @abdelmalekdjamaa76913 жыл бұрын

    Nice vid ❤. I expect your channel to grow rapidly. Just keep the hard work.

  • @darkaxce
    @darkaxce3 жыл бұрын

    Thank you so much!!!! This video really helped me. I spent 3 weeks researching and testing too many codes, but they didn't work!

  • @keithkirui7008
    @keithkirui7008 Жыл бұрын

    Installing everything required was a real hassle, with CUDA, cuDNN, tensorflow installation, keras, pillow, Conda, etc, alot is different now too..took a few days .but it worked bro.🔥🔥🔥🔥🔥🔥Shukran

  • @adminsemarakanabatic2398
    @adminsemarakanabatic23983 жыл бұрын

    Thanks man, Very useful Tutorial. Appreciate it !

  • @samuelmwendwa4327
    @samuelmwendwa43273 ай бұрын

    immediate sub. you just saved my final year project

  • @skewbinge6157
    @skewbinge61572 жыл бұрын

    this was so helpful and time saving thank you

  • @ThuanNguyen-yy7pu
    @ThuanNguyen-yy7pu2 жыл бұрын

    Thank you so much sir, I'm so confused when deploying the model to the website until I watch your video

  • @narangfamily7668
    @narangfamily76688 ай бұрын

    This is so useful! Thank you so much.

  • @tani.1772
    @tani.17722 ай бұрын

    you saved my semester thank you

  • @pandoratower375
    @pandoratower3753 жыл бұрын

    thank you. I find a log time good content

  • @aminetanouyat9643
    @aminetanouyat96432 жыл бұрын

    Thank you! This is very useful

  • @akshitrawat-gv2bh
    @akshitrawat-gv2bh2 ай бұрын

    thankyou so much for making this video really worth watching 🤗🤗

  • @Robay146
    @Robay14611 ай бұрын

    Thank you so much for this!

  • @sudhakarm4573
    @sudhakarm45738 ай бұрын

    great and clear explanantion

  • @aravindreddy3972
    @aravindreddy39722 жыл бұрын

    Great video🔥🔥

  • @somanihuduvey1173
    @somanihuduvey1173 Жыл бұрын

    Really helpful thanks sir

  • @thnapigok2307
    @thnapigok2307 Жыл бұрын

    Thank youu very much sirr..... Thank youuuuuuuuuu so much.... 🥰🥰😍😍

  • @ronihossain7428
    @ronihossain74285 ай бұрын

    Very good video.

  • @kushoza43d24
    @kushoza43d245 ай бұрын

    Thanks Helpful!!!

  • @soufiane_elbk
    @soufiane_elbk Жыл бұрын

    Nice it's works with me

  • @bartomiejmierzwa763
    @bartomiejmierzwa763 Жыл бұрын

    Good content!

  • @mahmudhasan3093
    @mahmudhasan3093 Жыл бұрын

    thank you sooo much

  • @AlonAvramson
    @AlonAvramson3 жыл бұрын

    Thank you so much for this tutorial! which IDE (Editor) are you using in this example? looks really cool.

  • @Jay-oc7mc

    @Jay-oc7mc

    3 жыл бұрын

    Hey, glad you found it helpful! Im using vscode is a pretty good editor and I use it mostly for front end stuff and python

  • @pascals5408
    @pascals54082 жыл бұрын

    Thank you

  • @muhalbarahusainhaqb5737
    @muhalbarahusainhaqb57372 жыл бұрын

    save a lot hour in my life. thanks jay

  • @muhalbarahusainhaqb5737

    @muhalbarahusainhaqb5737

    2 жыл бұрын

    simple and very insight full

  • @DinanathLad
    @DinanathLad2 жыл бұрын

    Thank for tutoring. I have a question. I have a trained ML model from vertex AI. Can i use that instead of VGG16?

  • @samuelk9722
    @samuelk97223 жыл бұрын

    thank you bro finally i got the solution for my problem. could u make a vid on deployment of (Detectron) Object detector model using Flask, which can give a video inference.

  • @Jay-oc7mc

    @Jay-oc7mc

    3 жыл бұрын

    Hey, I'm glad you found this useful! I have more videos planned in the future so I'll add this to my list :)

  • @lakshay_tyagi
    @lakshay_tyagi2 жыл бұрын

    Hi Jay I am working on my college project in which our grp made an ml model, so how can we pass that saved image to our ML model. Pls Suggest

  • @yaso1034
    @yaso10349 ай бұрын

    Hello! How can I use my own trained Model Instead of just using the Pre-trained Resnet50? Thanks

  • @lohithkumaar2876
    @lohithkumaar28762 жыл бұрын

    @Jay Can you please give a tutorial for the same with PyTorch model.

  • @flaskapp9885
    @flaskapp98853 жыл бұрын

    subscribed :) make more ml production level videos

  • @Jay-oc7mc

    @Jay-oc7mc

    3 жыл бұрын

    Thanks! Will be making more videos soon :) Some normal software engineering videos and some ML ones are planned

  • @flaskapp9885

    @flaskapp9885

    3 жыл бұрын

    @@Jay-oc7mc okay bro

  • @vikingdragon_yt7911
    @vikingdragon_yt7911 Жыл бұрын

    Can we permanently do it like i could just add my model once and when the link loads it upload images and predict

  • @Jay-oc7mc
    @Jay-oc7mc Жыл бұрын

    Link to the codebase can be found here now: github.com/JayMehtaUK/image-classifier

  • @saisuryamuddalapuram6252
    @saisuryamuddalapuram62522 жыл бұрын

    Can we integrate apache server in xampp and flask

  • @atacengiz7101
    @atacengiz71012 жыл бұрын

    It is a useful tutorial. Short and touches main points. I wonder that can you share Github link for the project? Thank Jay!

  • @Jay-oc7mc

    @Jay-oc7mc

    Жыл бұрын

    Just uploaded the code to Github: github.com/JayMehtaUK/image-classifier

  • @afzalpb3025
    @afzalpb30252 жыл бұрын

    Hello brother am trained a model using Jupiter notebook and i want to present it the user just like your example APP. How do I call the trained model to the APP. Thank you

  • @tokaelsayed923
    @tokaelsayed92312 күн бұрын

    what if i want to load my model? how would be the process in the predict function??

  • @leli7
    @leli73 жыл бұрын

    would be nice if you gave a link to the code

  • @siddardhamsd
    @siddardhamsd2 жыл бұрын

    Sir, please help me i am unable to import keras in my vs code i tried tensorflow also but i cant really import it in my app.py. also i created a venv file and dowloaded the tensorflow package in it but i cant import it my app.py.It shows Import "keras" could not be resolvedPylance reportMissingImports.

  • @sudhakarm4573
    @sudhakarm45738 ай бұрын

    Graph execution error: transpose expects a vector of size 3. But input(1) is a vector of size 4

  • @devanshpalliyath8107
    @devanshpalliyath8107 Жыл бұрын

    have you used any particular API over here? likes rest api?

  • @ropashamu5780
    @ropashamu57802 жыл бұрын

    Thanks Jay. Would you mind sharing the source code?

  • @siddardhamsd
    @siddardhamsd2 жыл бұрын

    How we can download tensorflow in vscode without getting errors and which version is suitable pls reply back. 😭

  • @aayushbhasin569
    @aayushbhasin5692 жыл бұрын

    hey! jay i watched ur video and actually loved it..i have trained my own model i am trying to deploy in the way u told me but when i choose the file in the web page and click on predict image it doesnt return anything and the web page reloads and the same page appears to choose file again.

  • @saifulshohag1209

    @saifulshohag1209

    2 жыл бұрын

    Same here. How did you solve it?

  • @_TheMickey_
    @_TheMickey_2 жыл бұрын

    I wish the source code was available to download

  • @muhammadilhamrobani7042
    @muhammadilhamrobani704210 ай бұрын

    hello, i followed your tutorial but i'm facing a problem, the html doesn't update after prediction, even though my prediction was done successfully, please help me. thanks in advance

  • @MavsFit
    @MavsFit9 ай бұрын

    and if I want to show a image?

  • @sudhakarm4573
    @sudhakarm45738 ай бұрын

    how to modify the vector input ..

  • @mumusoh
    @mumusoh3 жыл бұрын

    Why keras module error?

  • @nischalgiri4590
    @nischalgiri45903 жыл бұрын

    kindly please tell me the way that i can display that uploaded image inside index.html

  • @pratikpatil9448

    @pratikpatil9448

    4 ай бұрын

    Did you figure it out?

  • @anamee6534
    @anamee6534 Жыл бұрын

    can anyone tell me where is the issue my localhost is not working!! how am I gonna run this code in localhost?

  • @gurjeet333
    @gurjeet3333 жыл бұрын

    hi, can you provide a link to the code

  • @saipavangopisetty5937
    @saipavangopisetty59373 жыл бұрын

    Hey jay, I need your help. I build a web page using flask, but whiled prediction its not showing result, plezzz help me jay

  • @anishmanandhar1203

    @anishmanandhar1203

    3 жыл бұрын

    same here

  • @shivarajhalageri2513

    @shivarajhalageri2513

    2 жыл бұрын

    @Saipavan Gopietty can you please guide me on how to build website for deploying ml models.

  • @harishbhalaa3237
    @harishbhalaa323710 ай бұрын

    After deployment the model takes time to provide answer but your model provides the answer fastly. Efficiency of model or something else ???

  • @code9419
    @code9419 Жыл бұрын

    Is it free to deploy ml Model pls reply

  • @birgirkarl
    @birgirkarl Жыл бұрын

    Python deployment should come with a Rage Warning

  • @eyobmekonnen5474
    @eyobmekonnen54742 жыл бұрын

    thanks for all but please give me the code

  • @alaeddinebensalah7019
    @alaeddinebensalah7019 Жыл бұрын

    can you give us the code file

  • @Jay-oc7mc

    @Jay-oc7mc

    Жыл бұрын

    Just uploaded a copy of the code to github :) github.com/JayMehtaUK/image-classifier

  • @pccomputer-on3un
    @pccomputer-on3un Жыл бұрын

    Could you share the code please?

  • @Jay-oc7mc

    @Jay-oc7mc

    Жыл бұрын

    Code can be found on Github now: github.com/JayMehtaUK/image-classifier

  • @mohammedzain9876
    @mohammedzain9876 Жыл бұрын

    code?

  • @Jay-oc7mc

    @Jay-oc7mc

    Жыл бұрын

    github.com/JayMehtaUK/image-classifier

  • @krishshah3974
    @krishshah3974 Жыл бұрын

    gib code lol

  • @salahuddinabushaar7060
    @salahuddinabushaar70602 жыл бұрын

    fake , where is the deployment ?

  • @woefaker665
    @woefaker665 Жыл бұрын

    for img_to_array and load_img use those imports instead from keras.utils.image_utils import img_to_array from keras.utils.image_utils import load_img and install pillow : pip install Pillow

  • @oprix
    @oprix Жыл бұрын

    Sir want to connect with you. Can you provide LinkedIn id

  • @razzazz
    @razzazz3 жыл бұрын

    Thanks man! Very cool tutorial!