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")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Mel-Iza0/zero-shot") model = AutoModelForSequenceClassification.from_pretrained("Mel-Iza0/zero-shot", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Mel-Iza0/zero-shot: direct link, hf CLI and curl.
- Browser
- Download file 443 Bytes
-
https://huggingface.co/Mel-Iza0/zero-shot/resolve/main/README.md
- Command line
-
hf download hf://Mel-Iza0/zero-shot/README.md
-
curl -L -o README.md https://huggingface.co/Mel-Iza0/zero-shot/resolve/main/README.md
443 Bytes
metadata
language:
- pt
tags:
- deberta-v3
- zero-shot-classification
- zero-shot
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)