license: cc-by-4.0
language:
- el
- en
pipeline_tag: text-classification
Hellenic Sentiment AI
Model Description
This model is designed for sentiment analysis of Greek texts.
It classifies the sentiment of a given Greek sentence or paragraph into positive, negative, or neutral and also provides the confidence score of each prediction.
With a compact architecture of 278 million parameters and a model size of approximately 1.1 GB, this model is well-suited for local deployment on CPU devices, offering a favorable balance of performance and efficiency.
The model is the result of meticulous craftsmanship, carefully handcrafted and fine-tuned. A high-quality and human-curated multilingual dataset, with primary attention on the Greek language, was used to train and validate the model, ensuring that it learns from accurate and relevant examples. A rigorous development process involving multiple iterations of training, testing, and refinement, optimized the model's performance and adapted it to the nuances of the Greek language.
Model Details
- Model Name: HellenicSentimentAI
- Model Version: 1.0
- Language: Multilingual
- Framework: Transformers (Hugging Face)
- Max Sequence Length: 512
- Base Architecture: roBERTa
- Fine-tuning Data: The model was trained on a custom, curated multilingual dataset, comprising human-handpicked reviews from products, places, and restaurants, with a specific emphasis on Greek language texts.
Usage:
(Notice: There is no need for a GPU when inference the model)
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from transformers import pipeline
model_name = "gsar78/HellenicSentimentAI"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Initialize the sentiment analysis pipeline
sentiment_pipeline = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
# Define a function to analyze sentiment and format the result
def analyze_sentiment(text):
result = sentiment_pipeline(text)[0]
return f"Text: {text}\nSentiment: {result['label']}\nConfidence Score: {result['score']:.2f}"
# Example Greek text
greek_text = "Ο καφές δέν είναι πολύ τέλειος"
# Analyze sentiment
sentiment_result = analyze_sentiment(greek_text)
print(sentiment_result)
Output is like:
Text: Ο καφές δέν είναι πολύ τέλειος
Sentiment: negative
Confidence Score: 0.99
License
This model is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0). This means you are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material for any purpose, even commercially.
Under the following terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
For more details, see the CC BY 4.0 license.