(model: Model, texts: List[str], classes: np.ndarray)
return [lang for result in results for lang, _ in result]
Get model predictions for multiple texts as class labels rather than as a 2dim
    matrix of prediction probabilities.
Get model predictions for multiple texts as class labels rather than as a 2dim
    matrix of prediction probabilities.
Get model predictions for multiple texts as class labels rather than as a 2dim matrix of prediction probabilities .
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]
def get_model_preds ( model : Model , texts : List [ str ] , classes : np . ndarray ) -> List [ str ] : # 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 ]