Downloads · 30 days
10
13% of all-time downloads
mktr/SODA-BERT
SODA-BERT is a text classification model from mktr. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Fine-tuned Arabic language model based on UBC-NLP/MARBERTv2, trained on the OmanSent dataset, the first dataset produced using the SODA data collection framework. This model focuses on sentiment analysis and text clas…
Downloads · 30 days
10
13% of all-time downloads
All-time downloads
77
Public
Parameters
163M
651 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors651 MB · 99%
From the Hugging Face model README
Fine-tuned Arabic language model based on UBC-NLP/MARBERTv2, trained on the OmanSent dataset, the first dataset produced using the SODA data collection framework. This model focuses on sentiment analysis and text classification tasks in Arabic, with a particular emphasis on Omani and Gulf dialects.
UBC-NLP/MARBERTv2from transformers import AutoModelForSequenceClassification, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("mktr/SODA-BERT")
model = AutoModelForSequenceClassification.from_pretrained("mktr/SODA-BERT")
text = "الي يقول العماني ما مال شغل تفل في وجهه"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
predictions = outputs.logits.argmax(dim=-1)
# Map prediction to sentiment label
label_map = {0: "Negative", 1: "Positive", 2: "Neutral"}
predicted_label = label_map[predictions.item()]
print(f"Predicted Sentiment: {predicted_label}")