interpretml/interpret-text

Zero shot classifier with interpret text

subhamkhemka opened this issue · 0 comments

Hi

I am using the huggingface transformers zero shot classification pipeline.

from transformers import pipeline
classifier = pipeline("zero-shot-classification",
                      model="facebook/bart-large-mnli")
sequence_to_classify = "one day I will see the world"
candidate_labels = ['travel', 'cooking', 'dancing']
classifier(sequence_to_classify, candidate_labels)

I would like to use the word importance feature of the interpret-text module to get the important words for the predicted label.

Can you please help on how I could do this ?

Thanks,
Subham