A problem occurs when trying to load my custom mobilenet model.
Dear ml5 community,
I'm submitting a new issue. Please see the details below. ------------------------------------------------>
I'm trying to load my custom ml5 in my react js website, however, I'm facing some issues when I try to load the model. For instance, if I write the following code:
classifier.load('''../EcommarceApp/appAIModel/model.json'',custModelReady);
function custModelReady(){
console.log(' Custom Model Loaded!');
gotResults()
}
the following error occurred:

However, When I try to import the model:
import customModel from ''../EcommarceApp/appAIModel/model.json'',
classifier.load(customModel,custModelReady);
function custModelReady(){
console.log(' Custom Model Loaded!');
gotResults()
}
I usually get the following error:

Also Here is my full code:

Please help me I'm completely lost.
----------------------------------------->
Hi @MohammadNusir ,
Thank you for opening the issue with us! Can you share a link to your whole project (i.e. on GitHub), so that I can take a look at the code more closely?
Without looking at all the code though, here are some of my 2c re: the errors:
- Status code 404 means the server cannot find the webpage you have requested. Check where you tried to open a webpage in the code and see if the URL is valid.
-
Uncaught TypeError: Failed to execute 'readAsText' on 'FileReader': parameter 1 is not of type 'Blob'usually happens when you callreadAsTexton a hard-coded string, instead of a Blob or File. See official documentation here. Some useful StackOverflow questions include this and this.
Miaoye