I tried to load a model via url using tensorflow_hub package with success (the example snippet below):
#using tensorflow_hub
module_url = "https://tfhub.dev/google/universal-sentence-encoder/4"
model = hub.load(module_url)
print("module %s loaded" % module_url)
And with saved_model too, it works:
#using saved_model file
path = "."
model = tf.saved_model.load(path)
However, I need to read the model via url using only the tensorflow-cpu package so that my project is as small as possible in terms of package size for heroku slug size limitations.
Is there another way to load model via url https://tfhub.dev/google/universal-sentence-encoder/4 installing the only package tensorflow-cpu into the project?
Regards