Downloads · 30 days
13
2% of all-time downloads
ahmetyaylalioglu/text-emotion-classifier
text-emotion-classifier is a text classification model from ahmetyaylalioglu. 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.
This model is a fine-tuned version of bert-base-uncased on the "dair-ai/emotion" dataset, using LoRA (Low-Rank Adaptation) for efficient fine-tuning.
Downloads · 30 days
13
2% of all-time downloads
All-time downloads
665
Public
Parameters
109M
878 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors876 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of bert-base-uncased on the "dair-ai/emotion" dataset, using LoRA (Low-Rank Adaptation) for efficient fine-tuning.
label_list={"sadness", "joy", "love", "anger" ,"fear","surprise"}
[Describe your model, its architecture, and the task it performs]
[Describe what the model is intended for and any limitations]
The model was trained on the "dair-ai/emotion" dataset.
[Describe your training procedure, hyperparameters, etc.]
[Include your evaluation results]
Here's how you can use the model:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("ahmetyaylalioglu/text-emotion-classifier")
tokenizer = AutoTokenizer.from_pretrained("ahmetyaylalioglu/text-emotion-classifier")
text = "I am feeling very happy today!"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
predictions = outputs.logits.argmax(-1)
print(model.config.id2label[predictions.item()])