inctdd/told_br_binary_sm
Viewer • Updated • 7k • 9
How to use inctdd/told_br_binary_sm_bertimbau with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="inctdd/told_br_binary_sm_bertimbau") # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("inctdd/told_br_binary_sm_bertimbau", dtype="auto")Configuration Parsing Warning:Config file config.json cannot be fetched (too big)
Configuration Parsing Warning:Config file tokenizer_config.json cannot be fetched (too big)
This model was trained on a random subset of the told-br dataset (1/3 of the original size). Our main objective is to provide a small model that can be used to classify Brazilian Portuguese tweets in a binary way ('toxic' or 'non toxic').
You can use cURL to access this model:
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoTrain"}' https://api-inference.huggingface.co/models/alexandreteles/autotrain-told_br_binary_sm_bertimbau-2489776826
Or Python API:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("alexandreteles/autotrain-told_br_binary_sm_bertimbau-2489776826", use_auth_token=True)
tokenizer = AutoTokenizer.from_pretrained("alexandreteles/autotrain-told_br_binary_sm_bertimbau-2489776826", use_auth_token=True)
inputs = tokenizer("I love AutoTrain", return_tensors="pt")
outputs = model(**inputs)