class_docstr: An abstract base class that represents a TensorFlow classifier.
docstr: Exports classification labels into a label file.
  
  Args:
    export_dir: The directory to save exported files.
    label_filename: File name to save labels model. The full export path is
      {export_dir}/{label_filename}.
docstr_tok: ["Exports","classification","labels","into","a","label","file",".","Args",":","export_dir",":","The","directory","to","save","exported","files",".","label_filename",":","File","name","to","save","labels","model",".","The","full","export","path","is","{","export_dir","}","\/","{","label_filename","}","."]
code: def export_labels(
      self, export_dir: str, label_filename: str = "labels.txt"
  ):
      """Exports classification labels into a label file.
  
      Args:
        export_dir: The directory to save exported files.
        label_filename: File name to save labels model. The full export path is
          {export_dir}/{label_filename}.
      """
      if not tf.io.gfile.exists(export_dir):
          tf.io.gfile.makedirs(export_dir)
  
      label_filepath = os.path.join(export_dir, label_filename)
      tf.compat.v1.logging.info("Saving labels in %s", label_filepath)
      with tf.io.gfile.GFile(label_filepath, "w") as f:
          f.write("\n".join(self._label_names))
  
file_path: mediapipe/mediapipe/model_maker/python/core/tasks/classifier.py
imports: import os
  from typing import Any, Callable, Optional, Sequence, Union
  import tensorflow
  from mediapipe.model_maker.python.core import hyperparameters
  from mediapipe.model_maker.python.core.data import classification_dataset
  from mediapipe.model_maker.python.core.data import dataset
  from mediapipe.model_maker.python.core.tasks import custom_model
  from mediapipe.model_maker.python.core.utils import model_util
label_desc: Use image node_id 4 for calling the Classifier obj's underlying member method code with example usage: obj.export_labels(export_dir, label_filename) without return types