class_docstr: MetadataWriter to write the metadata into the text classifier.
class_docstr_tok: ["MetadataWriter","to","write","the","metadata","into","the","text","classifier","."]
docstr: Creates MetadataWriter for TFLite model with regex tokentizer.
  
  The parameters required in this method are mandatory when using MediaPipe
  Tasks.
  
  Note that only the output TFLite is used for deployment. The output JSON
  content is used to interpret the metadata content.
  
  Args:
    model_buffer: A valid flatbuffer loaded from the TFLite model file.
    regex_tokenizer: information of the regex tokenizer [1] used to process
      the input string. If the tokenizer is `BertTokenizer` [2] or
      `SentencePieceTokenizer` [3], please refer to
      `create_for_bert_model`.
    labels: an instance of Labels helper class used in the output
      classification tensor [4].
  
    [1]:
      https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L500
    [2]:
      https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L477
    [3]:
      https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L485
    [4]:
      https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L99
  
  Returns:
    A MetadataWriter object.
docstr_tok: ["Creates","MetadataWriter","for","TFLite","model","with","regex","tokentizer",".","The","parameters","required","in","this","method","are","mandatory","when","using","MediaPipe","Tasks",".","Note","that","only","the","output","TFLite","is","used","for","deployment",".","The","output","JSON","content","is","used","to","interpret","the","metadata","content",".","Args",":","model_buffer",":","A","valid","flatbuffer","loaded","from","the","TFLite","model","file",".","regex_tokenizer",":","information","of","the","regex","tokenizer","[","1","]","used","to","process","the","input","string",".","If","the","tokenizer","is","`","BertTokenizer","`","[","2","]","or","`","SentencePieceTokenizer","`","[","3","]",",","please","refer","to","`","create_for_bert_model","`",".","labels",":","an","instance","of","Labels","helper","class","used","in","the","output","classification","tensor","[","4","]",".","[","1","]",":","https",":","\/\/github.com\/google\/mediapipe\/blob\/f8af41b1eb49ff4bdad756ff19d1d36f486be614\/mediapipe\/tasks\/metadata\/metadata_schema.fbs","#","L500","[","2","]",":","https",":","\/\/github.com\/google\/mediapipe\/blob\/f8af41b1eb49ff4bdad756ff19d1d36f486be614\/mediapipe\/tasks\/metadata\/metadata_schema.fbs","#","L477","[","3","]",":","https",":","\/\/github.com\/google\/mediapipe\/blob\/f8af41b1eb49ff4bdad756ff19d1d36f486be614\/mediapipe\/tasks\/metadata\/metadata_schema.fbs","#","L485","[","4","]",":","https",":","\/\/github.com\/google\/mediapipe\/blob\/f8af41b1eb49ff4bdad756ff19d1d36f486be614\/mediapipe\/tasks\/metadata\/metadata_schema.fbs","#","L99","Returns",":","A","MetadataWriter","object","."]
code: def create_for_regex_model(
      cls,
      model_buffer: bytearray,
      regex_tokenizer: metadata_writer.RegexTokenizer,
      labels: metadata_writer.Labels,
  ) -> "MetadataWriter":
      """Creates MetadataWriter for TFLite model with regex tokentizer.
  
      The parameters required in this method are mandatory when using MediaPipe
      Tasks.
  
      Note that only the output TFLite is used for deployment. The output JSON
      content is used to interpret the metadata content.
  
      Args:
        model_buffer: A valid flatbuffer loaded from the TFLite model file.
        regex_tokenizer: information of the regex tokenizer [1] used to process
          the input string. If the tokenizer is `BertTokenizer` [2] or
          `SentencePieceTokenizer` [3], please refer to
          `create_for_bert_model`.
        labels: an instance of Labels helper class used in the output
          classification tensor [4].
  
        [1]:
          https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L500
        [2]:
          https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L477
        [3]:
          https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L485
        [4]:
          https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L99
  
      Returns:
        A MetadataWriter object.
      """
      writer = metadata_writer.MetadataWriter(model_buffer)
      writer.add_general_info(_MODEL_NAME, _MODEL_DESCRIPTION)
      writer.add_regex_text_input(regex_tokenizer)
      writer.add_classification_output(labels)
      return cls(writer)
  
imports: from typing import Union
  from mediapipe.tasks.python.metadata.metadata_writers import metadata_writer
label_desc: Use image node_id 1 for calling the MetadataWriter obj's underlying member method code with example usage: obj.create_for_regex_model(cls, model_buffer, regex_tokenizer, labels) and returns: cls