Cors error when loading models

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?

Thanks!

@Damian_LLuch_Castell,

Welcome to the Tensorflow Forum!

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.

Thank you!

This is also happening to me as of today.

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.

Any help would be appreciated.

Thanks.

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.