Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero shot classifier with interpret text #179

Open
subhamkhemka opened this issue Sep 16, 2021 · 0 comments
Open

Zero shot classifier with interpret text #179

subhamkhemka opened this issue Sep 16, 2021 · 0 comments

Comments

@subhamkhemka
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant