addAutoMLModel = async (automlRef, displayName, tags = null) => {
  const modelSpec = {
    displayName: displayName,
    tfliteModel: { automlModel: automlRef },
  };
  if (tags != null) { modelSpec.tags = tags; }
  const model = await ml.createModel(modelSpec);
  await model.waitForUnlocked();

  await ml.publishModel(model.modelId);

  const tagList = model.tags == null ? '' : model.tags.join(", ");
  console.log('Model uploaded and published:');
  console.log(`${model.displayName}\t\t${model.modelId}\t ${tagList}`);
}
Add an AutoML TensorFlow Lite model to your project and publish it.

@param {string} automlRef AutoML reference of the model you want to add.
 (e.g. 'projects/12345678/locations/us-central1/models/ICN1234567890')
@param {string} displayName A name to identify the model in your Firebase
 project. This is the name you use from your app to load the model.
@param {?Array<string>=} tags Optional tags to help with model management.