what the f is this tut. you did not explain it properly. there are alot of confusions. your github also does not contain even the minim code except your private heroku deployed one
If you are getting the error My 'MyAPI' is not defined try to install the same versions in requirements files. so use the two commands: pip freeze >> requirements.txt pip install -r requirements.txt Then in your URLs, if this still not working change the path to path('MyAPI/', include('MyAPI.urls')) and don't forget to register your model in admin.py.
at 14:46, idk if any of u guys had an error that it couldn't find ur app (his MyApi), but basically to fix it u just add ", include" right after path... so it looks like this "from django.urls import path, include" and then change the path to ur app to path('api/', include('MyApi.urls')) ; like i said idk if it relevant for anyone else but it wouldnt let me migrate until i did that
Wow man! This course is an absolute gold! And for someone like me, a self taught SWD and who also taken courses on ML/NN/Keras etc and just deployed Django website for my gf haha and did another Real Estate Django website lol... So was just trying to figure how to go about connecting these both now and your videos came up!!!! OMG you’re my angel lololol Absolutely mind blowing practical stuff and really hope it would help me to create me my start up that I wanted to build now for so so so loooooonnnnggg lol
Hello. New subbie here, thank you What if my data that im working with is very big. How do i load a text file of size 1.5G into postman for prediction?
First of all, this is a excellent video! I have a couple questions if you could answer please. You placed all your machine learning code in the views file. Is this where I would put it in a Production environment, or is there a better practice to place it somewhere else? My thinking was to somehow place the ML code in the models file. I was thinking of trying to update my DB with the ML results and then have the models.py file be able to pull it. Is that possible? You mentioned how you would probably clean it up the views file later. The git code looks the same as this video so just curious if you have the cleaned up code aswell?
You could create a Module (folder) called Utils within your projects and load your models, scalers, etc there. Therefore, you can call them from your views.
Hello! , i got this error ""Found array with 0 feature(s) (shape=(1, 0)) while a minimum of 1 is required." while running 'POST' on Postman with this url : 127.0.0.1:8000/status/ . what must i do now ?
Very interesting video. The transition with Django, with which I am comfortable was not successful. Maybe a newer version of pickle is in cause..., I keep getting the error module '__main__' has no attribute 'unpack' when using joblib.load('loan_model.pkl)_... I can't find a way to go around this bog... If you had any suggestions, I would appreciate...
Hi, I am trying to make a website that is able to use CNNs ( a deep learning network) on the back-end. And get the uploaded images from the user and do a segmentation of the uploaded image and share the segmentation results by sending a download link with the user. I know deep learning methods and its programming in python by using the frameworks like Pytorch and Tensorflow. But I do not know what to do next. Is django framework sufficient to make this happen? If not, could you please guide me about the required steps that I need to take to create such a website? Thanks for in advance!
the endpoint is just doing inference right? so no GPU needed? what happens if u use it to do training with GPU. will it be able to handle multiple requests?
If I understand your question, you want the end point to initiate training? If that’s the case that would chew up unnecessary compute power and also indicate that every request to the end point would lead to a substantial difference in end result. If that’s the case I’m not sure you have a stable model. Id run the model on new data on a predetermined cadence and use the API to tap into that algorithm. One reason I can think of doing what I believe you suggested is for facial recognition but outside of that it doesn’t sound feasible for this use case
@@SATSifaction currently, I'm working on a project that calls a deepfake detection API that I had build which uses GPU. So I'm quite unsure what happens if I try to process multiple requests at the same time. How should I go about throttling the incoming requests or how do I ensure that my GPU does not run out of memory when it process the incoming request,
After loading the model using joblibs , the runserver throws a "No module named Tensorflow/keras". Do I have to install all the software dependencies again in the venv just to use a trained model?
Seems we have not cretaed pickle file "scalers.pkl", in any of the past videos. Could you please let know, if i need to create a pickle file for scalers then it will be as below?? X = sc.fit_transform(X1) scalerfilename = 'scalers.pkl' joblib.dump(X, scalerfilename)
I am stuck on the part when we complete the models.py and run the server. I copied everything as you told. But, when I run it, it says NameError: name 'MyAPI' is not defined Please help. Also, I checked the github issues but it was of no use. I even intsalled the exact same versions as you used by pip install django==2.2.4 etc. Please guide me
Anyone tried doing the API Handling using class-based views instead of the shown functional view? I always prefer class-based views, but in this case, I'm not able to figure out how to make it work. Help would be much appreciated. :)
i mean i can do one hot using get_dummies but its instance cannot be saved while deploying so did you used scikit learn keras something like that for one hot in deployment phase
Your Model.py and Views.py submited Form Data not utilized on Mechine Leaving API POST Call at all ,API Decarator input and Model Prediction only process input and Giving output no relation happen api and Model
How can i pass multiple inputs white testing.(If i want to test for 5 ids .Then how should i pass 5 inputs and for each I'd .How predict () will be modified). So that prediction will be array of 5 id's
You would need to loop through the machine learning model with the ids in a dictionary which isn’t hard to do, it will just take a few min longer. However on the Django end that means a design change in the actual way output is displayed. Right now it’s displayed as a single user but if you want it to show multiple ids then you would need to build a for loop on the django HTML page (likely using ginga) and then decide how you want the front end to look like. Hope that helps
For the machine learning side if the model is pickled or you use checkpoints, 100 ids should be no problem with a for loop. The Django side will need more modifications
I am also getting this error "NameError: name 'MyAPI' is not defined" and if i try to run your code. It was requesting for username and password that was not known to me
@@usamauet 'DjangoAPI/urls.py' : from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path(' ', include('MyAPI.urls')), ] " " " make sure ur 'urls.py' in 'Djangoapi' look like this " " " 'MyAPI/urls.py' : from django.urls import path urlpattern[ ] " " " just leave urlpattern in MyAPI empty at testing " " "
Dude, you made a great tutorial but couldn't you have just gone stepwise when the actual implementation of the machine learning model was going? That would have been great for someone new in django and machine learning. Everything went smooth and suddenly you show all the code copy pasted already ....WTF
Thank you. If I spent the time to write everything out it would really take a long time. I want the users to be able to read code as well which is why I mix between the two.
Apologies you are correct. However to create the scalers is the same as creating the model. When you scale the model you would store the .fit method to a pickle module.
Bit confusing, mate you have jumped from one concept to another out of nowhere. Your first two videos were excellent, this one not so great, even someone with Django knowledge will have hard time figuring it out
ruclips.net/video/yD0_1DPmfKM/видео.html, here some link, that may fix 'MyAPI' with exception only if u follow along this link first then u edit it bit like this SAT tutorials, at least that working for me stuck at same case myapi didn't recognize
If you want to see the development from the start then watch this playlist 👉 ruclips.net/p/PLM30lSIwxWOivNtja1_ztft1S_vrMyA0z
what the f is this tut. you did not explain it properly. there are alot of confusions. your github also does not contain even the minim code except your private heroku deployed one
@@bossmad8265 they are certainly not everybody, good luck learning the concept from another channel.
If you are getting the error My 'MyAPI' is not defined try to install the same versions in requirements files. so use the two commands:
pip freeze >> requirements.txt
pip install -r requirements.txt
Then in your URLs, if this still not working change the path to path('MyAPI/', include('MyAPI.urls'))
and don't forget to register your model in admin.py.
thanks man
at 14:46, idk if any of u guys had an error that it couldn't find ur app (his MyApi), but basically to fix it u just add ", include" right after path... so it looks like this "from django.urls import path, include" and then change the path to ur app to path('api/', include('MyApi.urls')) ; like i said idk if it relevant for anyone else but it wouldnt let me migrate until i did that
The error are all gone. But when I open the server in browser it says 'Page not Found'
Those asking for scaler.pkl, this how i did it:
import joblib
joblib.dump(sc, 'scaler.pkl') # for saving
sc = joblib.load('scaler.pkl') # for loading
it doesnt work in my notebook
Wow man! This course is an absolute gold!
And for someone like me, a self taught SWD and who also taken courses on ML/NN/Keras etc and just deployed Django website for my gf haha and did another Real Estate Django website lol... So was just trying to figure how to go about connecting these both now and your videos came up!!!! OMG you’re my angel lololol Absolutely mind blowing practical stuff and really hope it would help me to create me my start up that I wanted to build now for so so so loooooonnnnggg lol
Awesome glad it helps
Hello, did you build deployment with this tutorial? I couldn't understand how to write some of the coding parts. Woulf you mind if you share?
Wow, this is great, thanks a lot!
You’re welcome
You made a jump at "25:52", and that's why majority of people are facing the error of no module named MyAPI.forms
Can you please link the video of the tutorial where you explained the machine learning model tutorial
Sure follow this play list. It starts with the ML model.
ruclips.net/p/PLM30lSIwxWOivNtja1_ztft1S_vrMyA0z
Hello. New subbie here, thank you What if my data that im working with is very big. How do i load a text file of size 1.5G into postman for prediction?
First of all, this is a excellent video!
I have a couple questions if you could answer please. You placed all your machine learning code in the views file. Is this where I would put it in a Production environment, or is there a better practice to place it somewhere else?
My thinking was to somehow place the ML code in the models file. I was thinking of trying to update my DB with the ML results and then have the models.py file be able to pull it. Is that possible?
You mentioned how you would probably clean it up the views file later. The git code looks the same as this video so just curious if you have the cleaned up code aswell?
You could create a Module (folder) called Utils within your projects and load your models, scalers, etc there. Therefore, you can call them from your views.
Is this the right way to load machine learning models in the view?
So for the scalers-variable in approvereject you just pickle the instance of MinMaxScaler()? Awesome videos. Looking forward for future content.
Yeah so any new values can get the same weight as the existing model. Thanks glad you enjoyed it
Hello! , i got this error ""Found array with 0 feature(s) (shape=(1, 0)) while a minimum of 1 is required." while running 'POST' on Postman with this url : 127.0.0.1:8000/status/ . what must i do now ?
Hello, does anyone know how to convert the input data using OneHotEncoding??
Please, which variable did you use to create the all_col.pkl? Thank you.
Very interesting video. The transition with Django, with which I am comfortable was not successful. Maybe a newer version of pickle is in cause..., I keep getting the error module '__main__' has no attribute 'unpack' when using joblib.load('loan_model.pkl)_... I can't find a way to go around this bog... If you had any suggestions, I would appreciate...
This video was made using TF 1. I know some users were having issues with TF2. What version do you have?
Hallo, i want to ask about scaler.pkl. what the scalers function and how can i get it save to pickle in python? thank you
Hi, I am trying to make a website that is able to use CNNs ( a deep learning network) on the back-end. And get the uploaded images from the user and do a segmentation of the uploaded image and share the segmentation results by sending a download link with the user.
I know deep learning methods and its programming in python by using the frameworks like Pytorch and Tensorflow. But I do not know what to do next. Is django framework sufficient to make this happen? If not, could you please guide me about the required steps that I need to take to create such a website?
Thanks for in advance!
the endpoint is just doing inference right? so no GPU needed? what happens if u use it to do training with GPU. will it be able to handle multiple requests?
If I understand your question, you want the end point to initiate training? If that’s the case that would chew up unnecessary compute power and also indicate that every request to the end point would lead to a substantial difference in end result. If that’s the case I’m not sure you have a stable model. Id run the model on new data on a predetermined cadence and use the API to tap into that algorithm. One reason I can think of doing what I believe you suggested is for facial recognition but outside of that it doesn’t sound feasible for this use case
@@SATSifaction currently, I'm working on a project that calls a deepfake detection API that I had build which uses GPU. So I'm quite unsure what happens if I try to process multiple requests at the same time. How should I go about throttling the incoming requests or how do I ensure that my GPU does not run out of memory when it process the incoming request,
@@tickozz I would love to see your project, can I have a link to it?
NameError: name 'MyAPI' is not defined I can't resolve this error
Hello, i am also getting the same error , @SATSifaction ,I greatly appreciate if u could help as why is this error?
@@padminidevnerrenu5604 guys even i'm facing same issue someone please help us out
Same isuue
MyAPI box doesn't appear on the Django administration page. I have done all correct. Can you please help me to solve that.
You need to make sure you activate it in the admin settings. It’s covered off in the video. Small step that some miss
@Shreepad Khandve Thank you man
After loading the model using joblibs , the runserver throws a "No module named Tensorflow/keras". Do I have to install all the software dependencies again in the venv just to use a trained model?
Yes you do
clear, nice
Seems we have not cretaed pickle file "scalers.pkl", in any of the past videos. Could you please let know, if i need to create a pickle file for scalers then it will be as below??
X = sc.fit_transform(X1)
scalerfilename = 'scalers.pkl'
joblib.dump(X, scalerfilename)
You need to create it or use the one on GitHub. I didn’t show the scalers as I wanted the user to learn and create it.
I am stuck on the part when we complete the models.py and run the server. I copied everything as you told. But, when I run it, it says
NameError: name 'MyAPI' is not defined
Please help.
Also, I checked the github issues but it was of no use. I even intsalled the exact same versions as you used by pip install django==2.2.4 etc.
Please guide me
That tells me you don’t have the right folder structure. How is your structure setup?
@@SATSifaction Exactly as shown in the video
AttributeError: module 'MyAPI.views' has no attribute 'myform'
I'm also stuck at this
I am also stuck here
#Django #keyTakeAways for me from this video.
25:45
27:00 router urls in API
Anyone tried doing the API Handling using class-based views instead of the shown functional view? I always prefer class-based views, but in this case, I'm not able to figure out how to make it work. Help would be much appreciated. :)
@SATSifaction how did you actually scaled the model and exported to pkl ? Could you paste a sample code here pls
How you managed to do one hot encoding on user data(didn't see code for that) i mean how to save that instance of one hot
Check out the first video in the series I believe what you are asking is covered there
i mean i can do one hot using get_dummies but its instance cannot be saved while deploying so did you used scikit learn keras something like that for one hot in deployment phase
You can actually save it by Pickleing the model
Thank you so much 😊
Your Model.py and Views.py submited Form Data not utilized on Mechine Leaving API POST Call at all ,API Decarator input and Model Prediction only process input and Giving output no relation happen api and Model
Watch the full series. The result is based on a backend ML model
I got a AttributeError at /status/
predict not found error in Postman. What is the solution for this?
you should add
from rest_framework import status
AttributeError: module 'BankMlApp' has no attribute 'urls'
while executing i am getting this error the same way i followed to u had followed
Please ensure you are running this in a virtual environment and using the requirements.txt file
where is the .csv file called?
How can i pass multiple inputs white testing.(If i want to test for 5 ids .Then how should i pass 5 inputs and for each I'd .How predict () will be modified). So that prediction will be array of 5 id's
You would need to loop through the machine learning model with the ids in a dictionary which isn’t hard to do, it will just take a few min longer. However on the Django end that means a design change in the actual way output is displayed. Right now it’s displayed as a single user but if you want it to show multiple ids then you would need to build a for loop on the django HTML page (likely using ginga) and then decide how you want the front end to look like. Hope that helps
If there are 100 ids then is for loop an optimum solution .
For the machine learning side if the model is pickled or you use checkpoints, 100 ids should be no problem with a for loop. The Django side will need more modifications
Can you please help me with an example
Wouldn’t be here but I can put it on my list of videos to do.
I am also getting this error "NameError: name 'MyAPI' is not defined" and if i try to run your code. It was requesting for username and password that was not known to me
Have you defined MyApi in Installed Apps of Setting.py check or IN urls.py check
@@bishrutneupane649 I define MyAPI in setting.py and also in urls.py
@@usamauet are u winning yet with that error 'MyAPI' not define dawg?
@@usamauet
'DjangoAPI/urls.py' :
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path(' ', include('MyAPI.urls')),
]
" " " make sure ur 'urls.py' in 'Djangoapi' look like this
" " "
'MyAPI/urls.py' :
from django.urls import path
urlpattern[
]
" " " just leave urlpattern in MyAPI empty at testing
" " "
It is showing no module hwo to resolve it
Try using a virtual environment and use the supplies requirements.txt
How you make allcol.pkl, please got it completely
did you find its solution ?
@@firojacharya nop
I got this error on postman !!!!!!!
ModuleNotFoundError at /status/
No module named 'keras
Just means you need to install Keras
@@SATSifaction thank you
Sir I've completed machine learning can I learning Django ????
Sure there should be nothing stopping you from learning either of them independently
Dude, you made a great tutorial but couldn't you have just gone stepwise when the actual implementation of the machine learning model was going? That would have been great for someone new in django and machine learning. Everything went smooth and suddenly you show all the code copy pasted already ....WTF
Thank you. If I spent the time to write everything out it would really take a long time. I want the users to be able to read code as well which is why I mix between the two.
What screen drawing app you use on macOS? ruclips.net/video/dJihgq_4gNg/видео.html
It’s called screen brush
@@SATSifaction thanks!
what is the code of scalers.pkl file??
It’s not a code. It’s a scaler file that is created. Video 2 shows you how to create it
@@SATSifaction I have seen video2, but you only create "loan_model.pkl" file. You did not create "scaler.pkl" file
Apologies you are correct. However to create the scalers is the same as creating the model. When you scale the model you would store the .fit method to a pickle module.
@@SATSifaction so the file u made in video 2 is scaler.pkl ?
isn't it ?
Nice :)
Bit confusing, mate you have jumped from one concept to another out of nowhere. Your first two videos were excellent, this one not so great, even someone with Django knowledge will have hard time figuring it out
got this error when working on the views: from . forms import ModelForm
ModuleNotFoundError: No module named 'my_api.forms'
Make sure you’re using the requirements.txt....also pls always check stackoverflow and other google sources
NameError: name 'MyAPI' is not defined I can't resolve this error
@Sup pro, are u winning yet with that error?
ruclips.net/video/yD0_1DPmfKM/видео.html, here some link, that may fix 'MyAPI' with exception only if u follow along this link first then u edit it bit like this SAT tutorials, at least that working for me stuck at same case myapi didn't recognize