Edit model card

SentimentBERT-AIWriting

This model is a fine-tuned version of bert-base-uncased for sentiment classification, particularly tailored for AI-assisted argumentative writing. It classifies text into three categories: positive, negative, and neutral. The model was trained on a diverse dataset of statements collected from various domains to ensure robustness and accuracy across different contexts.

Model Description

BERT (Bidirectional Encoder Representations from Transformers) is a transformer-based model designed to understand the context of a word in search results by considering the words that come before and after it. This fine-tuned version extends the original BERT's capabilities to the task of sentiment classification.

Purpose

The SentimentBERT-AIWriting model is intended to assist in understanding the sentiment of texts, which can be particularly useful for platforms that require an understanding of user sentiment, such as customer feedback analysis, social media monitoring, and enhancing AI writing tools.

How to Use the Model

You can use this model with the Hugging Face transformers library. Here is an example code snippet:

from transformers import BertTokenizer, BertForSequenceClassification

tokenizer = BertTokenizer.from_pretrained('MidhunKanadan/SentimentBERT-AIWriting')
model = BertForSequenceClassification.from_pretrained('MidhunKanadan/SentimentBERT-AIWriting')

text = "Your text goes here"

inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=128)
outputs = model(**inputs)

logits = outputs.logits
predictions = logits.argmax(-1)
labels = ['negative', 'neutral', 'positive']
predicted_label = labels[predictions.item()]

print(f"Text: {text}\npredicted_label: {predicted_label}\n")

Examples

Here are three example statements and their corresponding sentiment predictions by the SentimentBERT-AIWriting model:

Positive

  • Statement: "Despite initial skepticism, the new employee's contributions have been!"
  • Predicted Label: positive

Negative

  • Statement: "Nuclear energy can be a very efficient power source, but at the same time"
  • Predicted Label: negative

Neutral

  • Statement: "The documentary provides an overview of "
  • Predicted Label: neutral

These examples demonstrate how SentimentBERT-AIWriting can effectively classify the sentiment of various statements.

Limitations and Bias

While SentimentBERT-AIWriting is trained on a diverse dataset, no model is immune from bias. The model's predictions might still be influenced by inherent biases in the training data. It's important to consider this when interpreting the model's output, especially for sensitive applications.

Contributions and Feedback

We welcome contributions to this model! You can suggest improvements or report issues by opening an issue on the model's Hugging Face repository.

If you find this model useful for your projects or research, feel free to cite it and provide feedback on its performance.

Downloads last month
1,809
Safetensors
Model size
109M params
Tensor type
F32
·