code: def get_model_preds(
      model: Model, texts: List[str], classes: np.ndarray
  ) -> List[str]:
      """
      Get model predictions for multiple texts as class labels rather than as a 2dim
      matrix of prediction probabilities.
      """
      # predict in batches, otherwise memory blows UP
      results = (
          result
          for texts_pt in itertoolz.partition_all(1000, texts)
          for result in get_topn_preds_and_probs(
              model.predict(texts_pt), 1, classes
          )
      )
      return [lang for result in results for lang, _ in result]
  
file_path: textacy/src/textacy/lang_id/models.py
imports: from __future__ import annotations
  from typing import Callable, List, Optional, Sequence, Tuple
  import numpy
  import thinc
  import thinc.layers
  import thinc.types
  from cytoolz import itertoolz
  from thinc.api import Model, chain, concatenate
label_desc: Use image node_id 1 for calling a global function with example usage: get_model_preds(model, texts, classes) and returns: unknown