Downloads · 30 days
15
13% of all-time downloads
sneha21052004/emotion-roberta
emotion-roberta is a machine learning model from sneha21052004. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains a fine-tuned text classification model for emotion recognition. It can classify input text into emotional categories (e.g., happy, sad, angry).
Downloads · 30 days
15
13% of all-time downloads
All-time downloads
114
Public
Repo size
—
Likes
0
Public
Click a slice to open those files.
.json714 KB · 51%
From the Hugging Face model README
This repository contains a fine-tuned text classification model for emotion recognition. It can classify input text into emotional categories (e.g., happy, sad, angry).
| File | Description |
|---|---|
.gitattributes | Git configuration file. |
config.json | Model configuration (architecture, number of labels, etc.). |
merges.txt | BPE merge rules for tokenizer. |
special_tokens_map.json | Maps special tokens (like <PAD>, <CLS>). |
tokenizer.json | Complete tokenizer setup (vocab + merges). |
tokenizer_config.json | Extra tokenizer settings (normalization, preprocessing). |
vocab.txt | Tokenizer vocabulary. |
pytorch_model.bin | Trained model weights (PyTorch). [Upload this if not already uploaded] |
You can use this model with the Hugging Face Transformers library:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("sneha21052004")
model = AutoModelForSequenceClassification.from_pretrained("sneha21052004")
# Example input
text = "I am feeling happy today!"
inputs = tokenizer(text, return_tensors="pt")
# Make prediction
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.softmax(outputs.logits, dim=1)
print(predictions)