deep-diver / semantic-segmentation-ml-pipeline

Machine Learning Pipeline for Semantic Segmentation with TensorFlow Extended (TFX) and various GCP products
https://blog.tensorflow.org/2023/01/end-to-end-pipeline-for-segmentation-tfx-google-cloud-hugging-face.html
Apache License 2.0
93 stars 20 forks source link

Gradio app notebook #16

Closed deep-diver closed 2 years ago

deep-diver commented 2 years ago

A notebook to demonstrate how to build Gradio app with the model emitted from the Vertex Pipeline. The pipeline was run within my GCP project, there are two ways to test the model for you:

  1. You run the pipeline on your own. To do this, you need to set a GitHub Secret of the GCP credential. The name of the GitHub Secret should be your GCP PROJECT ID.

    • In this case, go to the Action tab, then select Trigger Training Pipeline section, then Run workflow with your own GCP PROJET ID.
  2. Download a temporary model emitted from the Vertex Pipeline. The downloadable GCS Bucket can be found in notebooks/inference_from_SavedModel.ipynb notebook.

After this issue is done, we will work on porting this notebook to the standalone Gradio application.

deep-diver commented 2 years ago

@sayakpaul

One thing to notice when writing a Gradio App is, the preprocessing functions embedded into the signature will not work (am I right?). So, they should be implemented as a part of the Gradio App.

sayakpaul commented 2 years ago

Thanks for being thorough with what's expected from the notebook!

I will begin working on it soon.