class_docstr: Coref model for a single edge. Compatible with EdgeFeaturesDataset.
class_docstr_tok: ["Coref","model","for","a","single","edge",".","Compatible","with","EdgeFeaturesDataset","."]
code: def __init__(self, model_path: Optional[str] = None, **model_kw):
      if model_path:
          # Load from SavedModel
          self.model = tf.keras.models.load_model(model_path)
      else:
          # Construct from params
          self.model = self.build_model(**model_kw)
  
imports: import os
  from collections.abc import Iterable
  from typing import Optional
  from absl import logging
  from lit_nlp.api import dataset
  from lit_nlp.api import dtypes
  from lit_nlp.api import model
  from lit_nlp.api import types
  from lit_nlp.lib import utils
  import numpy
  import tensorflow
label_desc: Use image node_id 2 to create a new SingleEdgePredictor object from inherited base classes: lit_model with example: obj = SingleEdgePredictor(model_path)