Hi, I’m developing a project and when loading some TensorFlow models, specifically @tensorflow-models/face-landmarks-detection is giving me CORS error (I’m trying on my local server, disabling Chrome’s Cors check), but when I upload it to my development server (S3) it still doesn’t load the models.
Any solution? should I talk to TensorFlow people to add the domain from where I’m making the request?
After disabling Chrome’s CORS check still you are unable to load model then you have to add header like this Access-Control-Allow-Origin:http://localhost:3500, please refer to this article and github repo in the article.
This isn’t my project but a project that I know uses TensorFlow and hosts an example has the same error. You can go to webgazer.cs and inspect the page to see the issue. This is exactly the same as what we’re seeing today in our project. Our project was working yesterday but is no longer working after no changes in deployed environments and is also breaking in local testing.
In case anyone else comes across this. We started debugging requests in Postman and found that the models were retrievable in certain conditions. Opened an issue with the TensorflowHub team on their GitHub page. Later received response from someone on their team that there were intermittent issues and asking us to retest. After seeing the message and retesting, our local and deployed environments were able to retrieve the models as expected.