How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("zero-shot-classification", model="Mel-Iza0/zero-shot")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("Mel-Iza0/zero-shot")
model = AutoModelForSequenceClassification.from_pretrained("Mel-Iza0/zero-shot")
Quick Links

How to use

classifier = pipeline("zero-shot-classification",
model='Mel-Iza0/zero-shot', tokenizer='Mel-Iza0/zero-shot')
#sorry for below lines
classes = []
for i in item.classes:
classes.extend(item.classes[i])
a = classifier(item.text,
classes,
hypothesis=hypothesis_template)['labels'][-1]
print('------------------------------------------')
print(a)
Downloads last month
110
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support