I have an Azure Function with a Cosmos trigger that listens to a container, processes the content (a text field), and then outputs a result. To process the text, I have a custom model trained in Tensorflow (.h5). Problem is, every time there's a change in the container or after every batch is captured, the model, which sits in a models folder outside the function folder, has to be loaded. This obviously isn't ideal.
Is there a way to have it load once? Maybe it would be best to host the model somewhere then call it, but is it possible to do it in the Azure Function or using any other Azure service?