Deploy ML Model On Webpage|Python(Flask)| Forest Fire Prevention Using AI
Вставка
- Опубліковано 9 лют 2025
- -Deploy ML model on webpage using flask.
-Deploying your machine learning model onto a webpage is very important part of a website. Flask allows you to do that .
-Flask is a microweb framework that integrates web application with any python program.
Source code : github.com/nac...
You can connect with me on LinkedIn: / nachiketa-hebbar-86186...
My published research paper on the same project: www.ijltemas.i...
Recommended books for getting better at ML Web Apps and Flask:
Monetizing Machine Learning: Quickly Turn Python ML Ideas Into Web Applications on the Serverless Cloud: amzn.to/32lLXuM
Flask Web Development: Developing Web Applications with Python: amzn.to/32caPFm
Hands-On Python Deep Learning for the Web: amzn.to/34CxnCb
Flask web development from scratch : amzn.to/32f00lS
Do subscribe to the channel and like the video if you want more videos like this!
You can connect with me on my socials:
Linkedin: / nachiketa-hebbar-86186...
My 2nd UA-cam Channel: / @nachitalks
My medium account(I publish blogs here): / nachihebbar
For every 1000 people selling you 10h course on the topic, there is one Indian guy explaining the topic in 3 minutes.
YOU ARE AMAZING. AFTER WATCHING YOUR VIDEO I COULD FIGURE OUT THE ROOT CAUSE OF MY BUG AND FIXED IT AFTER TRYING TO FIX IT SINCE TWO WEEKS. HANDS DOWN YOU'RE AMAZING. ISTG I COULD ACTUALLY CRY NOW OMG
This videos contains the content of 6, 7 lectures of python and flask. Very well explained. Cheers 👍
Thanks !
There are so many videos available to deploy models but all are misleading they have demonstrated model creation instead of deployment. you are very straight to the point, love it! wonderful it will help a lot...
Thank you, glad it helped!
Searched thousands of methods to get the right answer/solution to my query, and BOOOOOM HERE WO GO ... FINALLLLLYYYYY!!! Got the answer!
Thanks dost
mene Grt Lernng me 4 lakh diye the tab voh kuch nahi bta paye
and here you saved me in 10 min video..
Deeply I appreciate approach, Quite hard to get complicated content with such a simple explanation. Kudo amigo!
Thanks !
Simple and straight to the point, love it! Wish you all the best
Thanks !
Very clearly explained and straight forward. Love it! Keep doing what you're doing
Thanks !
Very helpful. Most videos by others were too complicated for me. This helped me
Glad it helped!
Everyone is making vids on model deployment where the model has only numerical features.
Kindly do a vid on model deployment where the model has categorical features as well since that is the most realistic case.
thank you for saving my life bro.🙏🏻
This is the video I was looking for..., thanks bro.
This guy really look like a Techie who knows all the mystery of tech World
thank you brother. i really wanted to deploy my model didnt know how thank you some much
Well explained! 🎉
Thank you for explaining this concept in a simplistic way!
You are a saviour
bro i just created a front-end for a music recommender which creates a playlist and the content of the playlist will be sent into ml model and the output will be shown in front-end can i use the same technique to my project
Thnx Bro! saved hours and hours of video tutorial in just 10 mins
Glad it helped!
Thanks ! Great video for ML beginners
Good Video . But I Felt You should have used the entire dataset for the training itself instead of splitting as we don't test our model right. A larger dataset is good for the performance of the deployed Model.
I want to integrate the multiple machine learning models into the single webpage... How to do it?
Thanks a lot man...👍✌
This is what i was looking for.
thx body.
keep up the good work
Thanks !
Big help man and you explained the code really well, thanks a lot!
what is the sklearn version used to create the model? beacause I am getting ModuleNotFoundError: No module named 'sklearn.linear_model.logistic' error and it's due to mismatch in version.
Quick and precise, thanks big bruh
This video was concise and easy to understand . I need help regarding sentiment analysis.
Any specific doubt in that ?
Good explanation
Hey thanks man. It helped me with my capstone project
brother did u know how Deploy ML model on webpage using flask into laravel ?? please make a content.....
Just what I needed man, just what I needed.(◍•ᴗ•◍)❤
Glad it helped !
Explained to very basic!! Thanks!!
Amazing Explanation!
hye basically i have a problem to run your code, it state like this, hope to get reply soon.
model=pickle.load(open('model.pkl','rb'))
ModuleNotFoundError: No module named 'sklearn.linear_model.logistic'
Thanks for this I just needed a little bit help
Great explanation
I tried to deploy this project.....it is properly showing the home page but at predicting part its showing file not found error, what is the solution??
I watched the video about 3 to 4 times and tried to use your code to run my web application and it doesn't work 🌚💔
I think I'm doing something wrong ..
How is the html file is connected with these py files ? Could you explain, please?
Which software is required to run this project ...
Please explain in step by step 🙏🙏🙏
You saved my day, heck yeah.
Thankyou homie
Glad it helped!
Thanks
Could all these be done completely in Jupiter notebook environment? If yes, could you do a demo? Also something missing in the video is how the directory “template” is created? Thanks
hello dude .. when i am downloading pickle file . it downloads as pickle file .. but opening in text file .. the content inside that file is different format language .. how can i solve it ?
Great video mate. Glad I found this.
great video for newbies.
Thanks!
Dude, this is amazing!
Thanks a lot !
I had a small doubt suppose here you have integrated the flask framework with your machine learning model so do we need js or react to implement the front end functionality..? Have you used js as well??
Easy to understand. Thanks!
hello. i tried to install pickle into my pycharm. however i couldnt find pickle. instead i only found pickles or pickler. are those package the same as pickle ?
Iam unable to execute the project
How to run the project , it is showing that
No module named flask
Please help me
Great video....but I worked on this and I am getting template not found error....any suggestions on that😢
Nice one ..keep up the good work!
Thanks !
this video is nice, am just a total beginner i just learnt how to create a model on jupyter notepad.but i want to learn more. can you recommend me ur videos about flask ?
Addition of two numbers is a program where we take inputs using input function in python, but in flask if we want to take input from user where the program file(model.py) is different from Flask(app.py) and inputs should be given from html page. So how would we connect both app.py and model.py files and how the input function gets replaced in Flask to take inputs from user as same as forest fire prevention program
Why do you need a model.py? Just take input from html form , and define a function in app.py to get the inputs, add them and return it.
@@NachiketaHebbar my question here is whether we can take user input of flask from html form to another python program. If in case to use input from flask files to Python program how we can deploy it
Which one to use flask or streamlit??? Which is good
thank you very much this is very helpful
Glad it helped!
Can this be done in vs code instead of pycharm?
ValueError: Found array with 0 feature(s) (shape=(1, 0)) while a minimum of 1 is required.
My project shows this error. Please help asap
nice
Informative. Thanks
Nice explanation! Keep going!
Thanks !
thank u so much. can i use the same procedure(i.e. use flask) in case of audio input from the website? i am using ravdess dataset
Yes, procedure will be same. But the model will be changed to a NLP one. You also have to change how you get the audio file from webpage to the model in flask.
@@NachiketaHebbar thank u so much
great work man.... wish dataset could have quit big..
what if our form has some object type input in such case how are we supposed to give it to our model?
Thank you so much
Can you please provide the ipynb notebook for the same.
In the same model if I want to pass temperature/O2/humidity Input a multiple time , How can I achieve that ?
Like I want to make predictions of two forest at a same time
Dude, it's awsm !!
when I am run this code ..jinja2.expections.TemplateNotFound error displayed...many errors .what to do?
You get that error if you have not put the html page inside the templates folder. And make sure it's spelled correctly in the render template function .
one more error founded..
ValueError: Found array with 0 feature(s) (shape=(1, 0)) while a minimum of 1 is required.
plz solve that
@@anjalivijayan525 while taking input in form, in the html page, make sure the name variable is set in the input tag. If the name variable is not specified ,no value of input is sent by the form to ml model.
@@NachiketaHebbar thanks
@@NachiketaHebbar okay. if don't mind .I have one more error..plz correct that..I am a beginner learning on flask.
ValueError
ValueError: invalid literal for int() with base 10: ''
Does your code update the prediction results when you type another set of values consecutively?
Really great explained...
Thanks !
Where we have to send the form data exactly??
Very informative video thank you!!! I’m doing a similar project but im using satellite data and CNN algorithim. Would you advise me to also use Flask?
Great super bro
Thank you!
I have pickle file exported from jupyter notebook. Can I use it directly in app.py without including the dataset in flask ?
Yes, you dont need the dataset once you get the pickle file
@@NachiketaHebbar thanks.
can u please show that how to get the implement while clicking the algorithm and giving the output. And the code should run in background
*Hello bro, I'm coverting an image to cartoon and I do have python model. But I don't know how to upload image and fed into model and then get output which is downloadable* All this thing is to be implemented in react app. 🙏🙏🙏 Please help
But how to run an entire project in flask?.. Suppose, I want to create a dynamic web app where I specify buttons for uploading the dataset, normalise it and then choosing a model to predict..
Also, after I take input for the file from the user, how do I save it and then reuse the same file when other buttons are clicked?
Hello,
I got the predicted output with the help of your video but when I'm using dtreeviz library to visualise my output because my algo is decision tree and trying it to display on application when clicking the submit button but I can't able to do that. Showing different Kind of errors. Mainly "TypeError: '>' not supported between instances of 'numpy.ndarray' and 'str'" , I have searched every thing but didn't able to resolve it. Can you please help me with that.
Thanks
Video is good. I thought you are going to deploy it ( so that it is accessible by everyone)
Is there any software need to be installed to connect ml file
after my values are filled and i click the submit button the page gets refreshed and the opens the same page
Can we host streamlit applications ?
will it work with .h5 model or I need to create .pkl one ???
Are we supposed to know lib like cs ,bootstrap etc other than python & flask for deploying models?
No its enough. You just need to learn about the platform on which you want to deploy it. Like heroku, for example.
Is there a way to deploy the model as a chrome extension?
What is the accuracy of the model as the csv file contains only 40 rows
The açcuracy is irrelevant as it is dummy data. The goal was just to show the process of training a model on some data and using the trained model in a webapp.
im getting this error TypeError: can't pickle _thread.RLock objects what shoul i do
Real nice and helpful video. Keep it up. Try to do the same thing with other frameworks also. Would be a nice Playlist.
Thanks !Will keep that in mind.
Can u say that can i do the same thing in spyder Or jupyter??
Hey, I have a doubt can we connect plz
Do we install the Flask in the model file or make another file?
I have both a model file and the website file with me. Like a fully made webpage just want to deploy the model in it.
How to input the values from an excel sheet and write output to the next column in the corresponding row?
nice 👏👏
Hi bro. Thanks for a great video.
I have a doubt regarding it. Is it possible to read data from a sensor and add it to one of the field, for eg. Temperature. If it is possible how can we implement this in the code?
please any help on his error anytime run the the app.py
ValueError: Found array with 0 feature(s) (shape=(1, 0)) while a minimum of 1 is required.
In the html form, did you specify the name attribute in the input element ?
@@NachiketaHebbar yes
@@NachiketaHebbar please which attributes
anytime I use ['POST'] this is what i get
The method is not allowed for the requested URL.
can you help me
Hi, I have been doing machine learning in python for a long time now and I have made several models such as diabetes detection , but I don't have much knowledge in web dev , can I use django instead of flask as a fram work with my models?
Thankyou in advance :)
you can use any framework. But people in ML tend to use flask cause its pretty handy and easy
Bro in Your case you have 2 class 0,1 output='{0:.{1}f}'.format(prediction[0][1], 2) but if have 3 class like 0,1,2 how i write code for my: output =
How to created .pkl file ? i can find how to created it. I have file ipynb in gg colab, plz help me
In a nutshell you explained everything, super cool bro
Thank you so much
You're welcome!