'How to access Universal sentence encoder/4 model if you have deployed it on GPU VM on google cloud

I have deployed universal sentence encoder/4 model to GPU VM on google cloud and created an endpoint - Which looks like this. - "http://IP-name/v1/models/use:predict"

Now how to access it? what input i give to this endpoint to work?

Please help..!!

While working on colab, i simply used the below code -

module_url = "https://tfhub.dev/google/universal-sentence-encoder/4" model = hub.load(module_url) def embed(input): return model(input)

But not sure how to access it after deploying it on cloud.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source