updateModel = async (modelId, tflite = null, displayName = null, newTags = null, removeTags = null) => {
  const model = await ml.getModel(modelId);

  // Any fields you don't specify will remain unchanged in the project. So,
  // create a request that only includes the non-null parameters.
  const updates = {};

  if (tflite != null) {
    // Upload a new tflite file to Cloud Storage.
    const files = await storageBucket.upload(tflite);
    const bucket = files[0].metadata.bucket;
    const name = files[0].metadata.name;
    updates.tfliteModel = { gcsTfliteUri: `gs://${bucket}/${name}` };
  }

  if (displayName != null) {
    updates.displayName = displayName;
  }

  if (newTags != null) {
    updates.tags = model.tags.concat(newTags);
  }

  if (removeTags != null) {
    if (!updates.tags) {
      updates.tags = model.tags;
    }
    updates.tags = updates.tags.filter(tag => !removeTags.includes(tag));
  }

  // Update the model.
  await ml.updateModel(model.modelId, updates);
}
Update a model in your project.

@param {string} modelId The ID of the model you want to update.
@param {string=} tflite The path to a tflite file that will replace the
 current one.
@param {string=} displayName A new name for the model.
@param {?Array<string>=} newTags Tags to add to the model.
@param {?Array<string>=} removeTags Tags to remove from the model.