Hellenic Sentiment AI
Model Description
This open-weights 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.
Version 1.1 is non-gated and free to use, using the HuggingFace APIs. See below for an example and the related HF Space for the demo.
Model Details
- Model Name: Hellenic Sentiment AI
- Model Version: 1.1
- Language: Greek only (Version 1.0), Multilingual (El, En, Fr, It, Es, De, Ar) (Version 1.1)
- Framework: Transformers from HuggingFace
- Max Sequence Length: 512
- Base Architecture: roBERTa
- Training Data: The model (version 1.1) was trained on a custom, curated multilingual dataset, comprising human-handpicked reviews from products, places, restaurants, etc., with a specific emphasis on Greek language texts. Supports emojis.
Production readiness
This model is a production-grade sentiment analysis solution, carefully designed and trained to deliver high-performance results in downstream applications. With its robust architecture and rigorous testing, it is ready to be deployed in real-world scenarios, providing accurate and reliable sentiment analysis capabilities for a wide range of use cases.
Ongoing Improvement
To ensure the model remains at the forefront of sentiment analysis capabilities, it is regularly updated and fine-tuned using new data and techniques.
This commitment to ongoing improvement enables the model to adapt to emerging trends, nuances, and complexities in language, ensuring that it continues to provide exceptional performance and accuracy in production environments.
Usage:
Note: Due to its compact architecture, this model can be efficiently deployed on CPU devices (e.g. Laptops), eliminating the need for a GPU during inference.
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.
- Downloads last month
- 8