Downloads · 30 days
8
0% of all-time downloads
techthiyanes/Bert_Bahasa_Sentiment
Bert_Bahasa_Sentiment is a text classification model from techthiyanes. Use it when you need a label for a piece of text. It is set up for transformers.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
Downloads · 30 days
8
0% of all-time downloads
All-time downloads
9.2K
Public
Repo size
2.7 GB
Likes
0
Public
Click a slice to open those files.
.h5670 MB · 33%
From the Hugging Face model README
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
model = AutoModelForSequenceClassification.from_pretrained('techthiyanes/Bert_Bahasa_Sentiment')
inputs = tokenizer("saya tidak", return_tensors="pt")
labels = torch.tensor([1]).unsqueeze(0)
outputs = model(**inputs, labels=labels)
loss = outputs.loss
logits = outputs.logits
outputs hello