Zero-Shot Classification
Transformers
PyTorch
Portuguese
deberta-v2
text-classification
deberta-v3
zero-shot
Instructions to use Mel-Iza0/zero-shot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mel-Iza0/zero-shot with Transformers:
# 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") - Notebooks
- Google Colab
- Kaggle
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
- 112