Maxson52's picture
Create app.py
c7bffdb
raw
history blame
231 Bytes
from transformers import pipeline
classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
categories = ['lifestyle', 'technology', 'entertainment', 'news']
classifier(text, categories, multi_class=True)