    def make_output_human_readable(
        self, output_dict: Dict[str, torch.Tensor]
    ) -> Dict[str, torch.Tensor]:
        """
        Does a simple argmax over the probabilities, converts index to string label, and
        add `"label"` key to the dictionary with the result.
        """
        if "probs" in output_dict:
            predictions = output_dict["probs"]
            if predictions.dim() == 2:
                predictions_list = [predictions[i] for i in range(predictions.shape[0])]
            else:
                predictions_list = [predictions]
            classes = []
            for prediction in predictions_list:
                label_idx = prediction.argmax(dim=-1).item()
                label_str = self.vocab.get_index_to_token_vocabulary(self._label_namespace).get(
                    label_idx, str(label_idx)
                )
                classes.append(label_str)
            output_dict["label"] = classes
        return output_dict
Does a simple argmax over the probabilities, converts index to string label, and
add `"label"` key to the dictionary with the result.
allennlp/models/heads/classifier_head.py