Zero-Shot Text Classification in 5 Lines of Code
Hello World!
Transformers have revolutionized Natural Language Processing (NLP) and at that, huggingfaces has made it really easy to use them for numerous NLP tasks. Recently, huggingfaces has made available a “zero-shot-classification” pipeline that let’s you perform text categorization, sentiment classification, or topic modeling without requiring any labeled data or training.
All you need to do is:
1. Import pipeline
2. Define input text and candidate labels
3. Run the pipeline.
Libraries Required:
1. TesorFlow 2.3.0
2. Torch 1.6.0
3. Transformers 3.0.2
More details at: