Error while calling fastai trained cnn model from javascript


below : Javascript client.jst xhr post ,send and onload peice using analyze end point

xhr.open(“POST”, ${loc.protocol}//${loc.hostname}:${loc.port}/analyze,true)

xhr.onload = function() {
if (this.readyState === 4) {
var response = JSON.parse(xhr.responseText);
el(“result-label”).innerHTML = Result = ${response["result"]};
}
el(“analyze-button”).innerHTML = “Analyze”;
};

var fileData = new FormData();
fileData.append(“file”, el(“file-input”).files);
xhr.send(fileData);


below : HTML Index.htmlcode peice


below : getting error at xhr.send(fileData) when i inspect on chrome browser
getting syntax error at parse , failed to load resource and method not allowed.

(index):1 Uncaught SyntaxError:
Unexpected token I in JSON at position 0
at JSON.parse ()

at XMLHttpRequest.xhr.onload (client.js:34)

failed to load resource responded with status of 404()
https://whichleaf2.onrender.com/favicon.ico

Method Not Allowed
https://whichleaf2.onrender.com/analyze