tensorflow / community

Stores documents used by the TensorFlow developer community

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use my model in a webpage

GialiBoM opened this issue · comments

commented

I have created an object recognition model, using Colab where I can load an image from my drive and the model recognizes the object from my object
I saved the model in .json with its related .bin sheets
But I also have the same model saved in .py .ipynb .h5

I would like to apply this acknowledgment template on my website, in JS

I've been trying to find out online for days, or reading this link
https://www.tensorflow.org/js/tutorials/conversion/import_keras
I also tried the code shown here
but I still can't find a solution

@GialiBoM could you please clarify your problem?

@GialiBoM could you please clarify your problem?

I am also having the issue, unable to load my .json model using tf.loadModel("path to model")

It is showing this error "tf.loadModel" is not function
I have also tried tf.loadLayersModel, but having same error

How to load keras based model in js?

@preyash2047 thanks for your report.

How to load keras based model in js?

Here is a good example where you can find how to import your model. Could you please run it locally and confirm that loadLayersModel works for you in this example. Here is a place where we load a model.

It is showing this error "tf.loadModel" is not function

Could you confirm please that you imported TensorFlow correct?

Could you also share a .json file or an example of code that run tf.loadLayersModel?

Thanks.

commented

@hodovani Sorry if I answer just now
I leave you my exact question, with reference code here
https://stackoverflow.com/questions/63703062/load-object-recognition-model-created-in-colab-in-a-javascript-web-page

Hey @GialiBoM ,

I have done a project on handwritten text recognition and implemented using tensorflow.js, and I have implemented this on 25th Sep 2020, so everything will work for you also
check out my project which is live at https://preyash2047.github.io/textdetection.html
Repo: https://github.com/preyash2047/preyash2047.github.io/blob/master/textdetection.html

Note: use console to know the status of model downloading and background process