Deployment of Deep Learning Model using Flask

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ต.ค. 2024
  • Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries.[3] It has no database abstraction layer, form validation, or any other components where pre-existing third-party libraries provide common functions. However, Flask supports extensions that can add application features as if they were implemented in Flask itself. Extensions exist for object-relational mappers, form validation, upload handling, various open authentication technologies and several common framework related tools. Extensions are updated far more regularly than the core Flask program.
    #FlaskDeepLearningModelDeployment
    github url: github.com/kri...
    You can buy my book where I have provided a detailed explanation of how we can use Machine Learning, Deep Learning in Finance using python
    url: www.amazon.in/...

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

  • @ijeffking
    @ijeffking 5 ปีที่แล้ว +6

    Thank you so much. You are simply a blessing.!!!

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

    Tested!!!!!! It works. Great work Krish
    God Bless brother

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

    Great video! 2023 and still helpful

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

    you are a lucky charm. I was looking for the exact same app. Thank you so much.

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

    Thank u it's helpful for me

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

    @krish naik thank for sharing your knowledges easily..

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

    Thanks a lot for this example!

  • @neonlight1203
    @neonlight1203 4 ปีที่แล้ว

    Thank you for this simple explanation :)

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

    I'm using tensorflow 2.10.1, which version of Flask is recommended to avoid compatibility issues with Tensorflow?

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

    Heyy, what is API used over here?
    It is a pre - available API or an API written by you?

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

    Hi Krish, thank you for the video. Could you tell me if I can add probability value for the predicted image so it show in the web?

  • @farhanhaikhan7307
    @farhanhaikhan7307 4 ปีที่แล้ว +5

    Great job man! I could deploy really easily using your piece of code. But I'm a noob in terms of java script and html/css. Could you help me display another image as a predicted output?

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

      I want same thing. Please provide solution of it.

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

    I like it! u deserve a million subscribers!

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

    Hi, I am getting the following error for loading and saving the model: Unable to create file (unable to open file: name = 'C:\Users\Admin\Desktop\models', errno = 13, error message = 'Permission denied', flags = 13, o_flags = 302). Please help. I have tried to change the permissions of the folder too but that has not resolved the error

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

    @Krish Sir i am facing "tensorflow.python.framework.errors_impl.InvalidArgumentError: Tensor input_3:0, specified in either feed_devices or fetch_devices was not found in the Graph" error. What should i do ? Thank you.

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

    Bro Vibes to Kadhal Vandhale song from Singam movie 🕺

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

    why you never told us about all the necessary files like procfile???

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

    Can you do a little bit more Krish? Could you please show us how to deploy the 'wrapped model' to Docker and Kubernetes, or how to connect the predicted model from Flask to the back-end framework such as NodeJS? That will be a big help! Thanks!

    • @sajalagrawal1430
      @sajalagrawal1430 4 ปีที่แล้ว

      you can create api via flask and access that api via node

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

    Thank you so much :)

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

    Thanks

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

    Hello plz make video of .CSV data deployment using keras in flask

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

    great video

  • @VidyaSagar-hc9nu
    @VidyaSagar-hc9nu 4 ปีที่แล้ว

    thank you soo......much sir

  • @ashkanradnia8596
    @ashkanradnia8596 4 ปีที่แล้ว

    which are the previous videos you are referring to?2:22

  • @milanhazra4115
    @milanhazra4115 4 ปีที่แล้ว

    Nice tutorial....

  • @ajitha8216
    @ajitha8216 4 ปีที่แล้ว

    Sir, can we do the same thing using Django?

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

    Nice video! How can i make the same work with request? I want to send the image with request and get the result as json.

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

    hii krish sir, tahnks for your wonderful videos and guidance in data science. i am doing the same process to deploying my model. but i am facing some issue in it actually when i am giving the image to localhost server, it only show the image and not predict any thing , only reloading is continuing, many time . please help me.

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

    Hi, is there any tutorial on access it from android studio?

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

    Hi, I've used this code but while clicking the predict button it's not showing the result even after waiting for long time. Can anyone please help me with this error

  • @ajaysuresh8856
    @ajaysuresh8856 5 ปีที่แล้ว

    Krish Could u show how to train multiple images using Keras . Like You have imported images from Imagenet could u please tell me how to create our own dataset and train images , Please do upload a video on that .I couldn’t see any video on youtube to do object training using Keras.Thank You

  • @lawboonkai5617
    @lawboonkai5617 4 ปีที่แล้ว

    what version of keras,tensorflow,tensorboard you use in this video

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

    For custom data. I have trained ssd model. Now I want to deploy it. What should I need to do. [I have pb file]

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

    I get value error when deploying text data ,for only image it is working in flask.

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

    I keep getting this error ImportError: cannot import name 'resnet50' from 'tensorflow.keras.applications.resnet50' (C:\Users
    ishi\anaconda3\lib\site-packages\tensorflow\keras\applications
    esnet50\__init__.py) when trying to save the resnet model. How do I resolve it.

  • @dataisfun4964
    @dataisfun4964 4 ปีที่แล้ว

    Nice video man. I used mobilenet the code worked well but when I upload images it refuses to make any prediction...
    did you finetune the resnet before using it...?

    • @aleverdo5110
      @aleverdo5110 4 ปีที่แล้ว

      hey, i had the same problem, maybe try this: stackoverflow.com/questions/54652536/keras-tensorflow-backend-error-tensor-input-10-specified-in-either-feed-de
      it worked for me, good luck!

    • @mdkhairulislam5327
      @mdkhairulislam5327 4 ปีที่แล้ว

      @@aleverdo5110 i used your solution but didn't work. is there any other way?

    • @aleverdo5110
      @aleverdo5110 4 ปีที่แล้ว

      @@mdkhairulislam5327 I had a lot of problems with the tensorflow library, I used the method shown above and downgraded the tensorflow 2.1 to 2.0.0 and it worked with keras 2.3.1. It seems like everyone got another problem with tensorflow, looked at a lot of StackOverflow problems and tried several of them, so If downgrading the version of tensorflow does not work, try to look on google by googling your error and cross your fingers.. good luck! :)

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

    can i use my own model in this ?

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

    how to save our existing model. here u use resnet model. how to get that.....

  • @tech_walkz6218
    @tech_walkz6218 4 ปีที่แล้ว

    I have a pretrained model in .pb format,now what i do for the deployment in flask

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

    Hi Krish please make a video on how to find libraries for a specific project .. which kind of libraries is suitable for that project

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

    How can I stream the video feed from my android camera over the internet to a server back home, run some computations on a model that lives on that server than return a result back to the android device?

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

    where is the model?

  • @keshavgupta129
    @keshavgupta129 5 ปีที่แล้ว

    hey krish could you please make a video on deploying more than one model ,I tried doing that and I am getting many errors,the error that is hanging around is attribute error which says thread. local has no attribute value

  • @PrityKumari-rq2gp
    @PrityKumari-rq2gp 3 ปีที่แล้ว

    hi krish i want to deploy deep learning cnn on arduino. please make a video on it. Thank You!

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

    Traceback (most recent call last):
    File "app.py", line 26, in
    model._make_predict_function()
    AttributeError: 'Functional' object has no attribute '_make_predict_function'
    there is the same problem?

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

      Did you find a solution for this error ? I found out that they removed it from current tensorflow and keras. No idea how to fix it.

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

      @@tahmeedhossain2910 change "model._make_predict_function() to "model.make_make_predict_function()"

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

      change "model._make_predict_function() to "model.make_make_predict_function()"

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

      change "model._make_predict_function() to "model.make_make_predict_function()"

  • @rasoolhasan
    @rasoolhasan 5 ปีที่แล้ว

    can it work with fast ai model??

  • @AhmedHassan-md5ty
    @AhmedHassan-md5ty 2 ปีที่แล้ว

    the predict btn is not working with me what can ido for work
    some help please

  • @yashmistry61
    @yashmistry61 4 ปีที่แล้ว

    Can I do same steps with .pb or .weight model file?

  • @ahmedshingaly763
    @ahmedshingaly763 4 ปีที่แล้ว

    thanks man

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

    can i run tflite model into flask?

  • @paintwithvimal
    @paintwithvimal 4 ปีที่แล้ว

    @Krish Naik can you send or put the link of source code of model

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

    Great video! However I'm getting this error after clicking the predict button "tensorflow.python.framework.errors_impl.InvalidArgumentError: Tensor input_3:0, specified in either feed_devices or fetch_devices was not found in the Graph"

    • @ankitjatiya9702
      @ankitjatiya9702 4 ปีที่แล้ว

      Me getting the same error, did you get a solution?

    • @mdkhairulislam5327
      @mdkhairulislam5327 4 ปีที่แล้ว

      @@ankitjatiya9702 did you get the solution?

    • @ankitjatiya9702
      @ankitjatiya9702 4 ปีที่แล้ว

      @@mdkhairulislam5327 I created an environment in Anaconda and reinstalled tensorflow there, it worked!

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

      I got same error, resolved with "app.run(debug=False, threaded=False)", I just google search got the answer.

    • @alfredmoller1891
      @alfredmoller1891 4 ปีที่แล้ว

      @@raymondcao1944 Thanks my bro...It worked!!!

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

    I implemented a code in tensorflow 1.x earlier, for which I want to make the same deployment environment. tf 2.x saves the model in standard serialization (.h5). The tf 1.x saves in a different way, separate the model weights, variables, structure. Did anyone help me??

  • @nikitashaw5551
    @nikitashaw5551 4 ปีที่แล้ว

    Hi please help! I always get the same prediction for all the images

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

    Segmentation fault for me while using this code can anyone help me

  • @ndminhnhat
    @ndminhnhat 5 ปีที่แล้ว

    can you try tensorflow serving?

    • @krishnaik06
      @krishnaik06  5 ปีที่แล้ว

      Sure I will upload in the next video

    • @ndminhnhat
      @ndminhnhat 5 ปีที่แล้ว

      @@krishnaik06 Thanks man.

  • @dangkhanhson
    @dangkhanhson 4 ปีที่แล้ว

    how can i create model_resnet.h5 ?

  • @anishjain8096
    @anishjain8096 4 ปีที่แล้ว

    Bhai on doing this error comes
    Thread.local object has no attribute value

  • @PramodKumar-dr8nn
    @PramodKumar-dr8nn 4 ปีที่แล้ว

    When i use the line np.array [img,]) and run my app.py file, why I'm getting the error as AttributeError: '_thread._local' object has no attribute 'value'.
    I tried by setting threaded = false but I'm still getting the error
    Can you please help me out.

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

      Hey use this from tensorflow.keras.models import load_model instead of just loading directly from keras

    • @PramodKumar-dr8nn
      @PramodKumar-dr8nn 4 ปีที่แล้ว

      @@ishdutttrivedi4315 Thank you so much, i was stuck at this step from last week. It is working now, thank you again.

    • @ketchupparty9997
      @ketchupparty9997 4 ปีที่แล้ว

      @@ishdutttrivedi4315 i did the same thing with a nlp model and now I am getting function call stack error... Please help me... With this error

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

    AttributeError: '_thread._local' object has no attribute 'value'

    • @ketchupparty9997
      @ketchupparty9997 4 ปีที่แล้ว

      I am having the same error with one of my nlp web app.... Please some one help me

  • @SHALOM26624
    @SHALOM26624 4 ปีที่แล้ว

    AttributeError: '_thread._local' object has no attribute 'value' how to overcome this issue??? please let me know.....

    • @sajalagrawal1430
      @sajalagrawal1430 4 ปีที่แล้ว

      set threaded=False in app.run().

    • @PramodKumar-dr8nn
      @PramodKumar-dr8nn 4 ปีที่แล้ว

      Hey bro, did you find the solution for this error? I'm still getting this error even after threaded = false.

    • @SHALOM26624
      @SHALOM26624 4 ปีที่แล้ว

      @@PramodKumar-dr8nn nope bro..... I've searched a lot....and found out it can be a keras version error

    • @PramodKumar-dr8nn
      @PramodKumar-dr8nn 4 ปีที่แล้ว

      @@SHALOM26624 i have reinstalled keras and flask but the error still persists.

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

    sir can you share model.h5 file or model train files

  • @kushaldhole16
    @kushaldhole16 5 ปีที่แล้ว

    on github there is no model folder

    • @asyrafzlkln1701
      @asyrafzlkln1701 5 ปีที่แล้ว

      You must uncomment the line starting from keras.applications until model.save() to download the model.

    • @dataisfun4964
      @dataisfun4964 4 ปีที่แล้ว

      You would have to download your own pre-model from keras documentation and add a folder to it.

  • @SH-um5bb
    @SH-um5bb ปีที่แล้ว

    Not working.

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

    ```AttributeError: '_thread._local' object has no attribute 'value' How to Solve```
    > How to Solve this Error

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

    AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'

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

    Thanks

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

    Everytime when I'm replacing the model with my model getting this error. Have been trying to solve this since few days. Please help me out
    AttributeError: 'Functional' object has no attribute '_make_predict_function'
    either its functional or sequential model