Facing problem in deplying pyhton application from github- unable to load tensorflow saved model in AZURE.

Vikesh Kumar 21 Reputation points
2021-07-04T19:53:40.64+00:00

I am trying to deploy a classification TensorFlow model on AZURE from GitHub. It is getting deployed correctly which can be seen from the below logs.
111656-image.png

But I'm getting an OSError on log Stream saying saved model doesn't exist as shown below. The error msg is highlighted in red.
111560-image.png

But this is working correctly on local. This model has been checked locally.
The repository for this can be checked at https://github.com/Vikeshkr-DSP/cassava-leaf-disease-prediction.
Thanks in advance for your help.

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,335 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,937 questions
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 22,706 Reputation points Moderator
    2021-07-06T14:43:55.013+00:00

    The above issue on OSError: SavedModel file does not exist at: cassava_leaf.h5/{saved_model.pbtxt|saved_model.pb} was due to a bit large size of model and we did not provide an absolute path to the model location, the application could not find the same during startup.

    The issue resolved by manually transferring the h5-model file to a location like /home on the App Service and updated the app.py file to use an absolute path in order to refer the file.

    Similar to: model=load_model('/home/cassava_leaf.h5')

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.