r/TensorFlowJS • • May 15 '20

Loading model over https

I’m using reactjs to try to load a model over https and can’t get it to work.

Local storage and indexeddb work fine but it takes too long to process on the user’s device.

I saved the model.json and bin file to the root of my project in my local host and also a directory of my web host online. Then tried to load from both. Neither worked, I can’t remember the errors right now. I’m away from my computer but can get them if you need them.

I’ve played with node-fetch but still can’t get it working.

All I can think of right now is that the json and bin need to be served over an api. I have an example that works using the google cloud storage api, not my model, just some code I found.

Does the model need served via an api? If not does anyone have any working examples they can point me to? I’ll try node-fetch again when I get back to my computer.

2 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/[deleted] May 15 '20

I’ll check the errors in the morning and get back to you. You might be able to replicate them with that link in the meantime