Downloads · 30 days
5
7% of all-time downloads
GZogra/bert-ft-sentiment-skroutz-gr
bert-ft-sentiment-skroutz-gr is a text classification model from GZogra. Use it when you need a label for a piece of text. It is set up for transformers.
This is a fine-tuned BERT model for sentiment analysis in Greek, trained to classify short texts or reviews as "positive" or "negative".
Downloads · 30 days
5
7% of all-time downloads
All-time downloads
67
Public
Parameters
113M
452 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors452 MB · 100%
From the Hugging Face model README
This is a fine-tuned BERT model for sentiment analysis in Greek, trained to classify short texts or reviews as "positive" or "negative".
This model is a Greek BERT (nlpaueb/bert-base-greek-uncased-v1) fine-tuned on a dataset of reviews for sentiment classification. It predicts whether a given text expresses positive or negative sentiment.
This model can be used for Greek text sentiment classification in reviews, comments, or social media content. It is suitable for tasks such as automated feedback analysis or social sentiment monitoring.
The model can be used as a feature extractor or as part of a pipeline for downstream tasks such as multi-class sentiment classification, recommendation systems, or opinion mining.
The model is trained on a limited dataset (~6.5K saples) of Greek reviews on Skroutz Reviews Dataset.
About the Dataset: This is a dataset of shop reviews in Greek language from the website Skroutz for sentiment analysis. There are 6552 reviews divided into two categories 3276 positive and 3276 negative. There are three columns (id, review, label). Dataset
Biases present in the dataset (e.g., overrepresentation of certain products, domains, or writing styles) may affect predictions. Users should be aware that the model may not generalize to all Greek text domains or dialects.
Use caution in critical applications such as legal, medical, or high-stakes decision-making. Evaluate model outputs against domain-specific data before deployment.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_name = "GZogra/bert-ft-sentiment-skroutz-gr"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model.to(device)
# Example inference
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=128)
inputs = {k: v.to(device) for k, v in inputs.items()}
with torch.no_grad():
outputs = model(**inputs)
pred = torch.argmax(outputs.logits, dim=1).item()
labels = {0: "negative", 1: "positive"}
text = "Το προϊόν ήταν εξαιρετικό!"
print(labels[pred])
Skroutz_dataset.xlsx with columns id, text, label (positive/negative)nlpaueb/bert-base-greek-uncased-v1 tokenizerTrainer