Spaces:
Build error
Build error
from transformers_interpret import SequenceClassificationExplainer, MultiLabelClassificationExplainer | |
def explainer(input_statement, model, tokenizer): | |
# cls_explainer = SequenceClassificationExplainer(model, tokenizer) | |
cls_explainer = MultiLabelClassificationExplainer(model, tokenizer) | |
word_attributions = cls_explainer(input_statement) | |
return dict(word_attributions) | |