Text Classification
Transformers
PyTorch
TensorFlow
JAX
Safetensors
English
bert
emotion
Eval Results (legacy)
text-embeddings-inference
Instructions to use bhadresh-savani/bert-base-uncased-emotion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bhadresh-savani/bert-base-uncased-emotion with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="bhadresh-savani/bert-base-uncased-emotion")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("bhadresh-savani/bert-base-uncased-emotion") model = AutoModelForSequenceClassification.from_pretrained("bhadresh-savani/bert-base-uncased-emotion", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
|
Download README.md from bhadresh-savani/bert-base-uncased-emotion: direct link, hf CLI and curl.
- Browser
- Download file 1.2 kB
-
https://huggingface.co/bhadresh-savani/bert-base-uncased-emotion/resolve/078cc5550c73ae5ec61d3ae80abdc5973a1e542d/README.md
- Command line
-
hf download hf://bhadresh-savani/bert-base-uncased-emotion@078cc5550c73ae5ec61d3ae80abdc5973a1e542d/README.md
-
curl -L -o README.md https://huggingface.co/bhadresh-savani/bert-base-uncased-emotion/resolve/078cc5550c73ae5ec61d3ae80abdc5973a1e542d/README.md
1.2 kB
| language: | |
| - en | |
| thumbnail: https://avatars3.githubusercontent.com/u/32437151?s=460&u=4ec59abc8d21d5feea3dab323d23a5860e6996a4&v=4 | |
| tags: | |
| - text-classification | |
| - emotion | |
| - pytorch | |
| license: apache-2.0 | |
| datasets: | |
| - emotion | |
| metrics: | |
| - Accuracy, F1 Score | |
| # bert-base-uncased-emotion | |
| ## Model description: | |
| `bert-base-uncased` finetuned on the emotion dataset using HuggingFace Trainer. | |
| ``` | |
| learning rate 2e-5, | |
| batch size 64, | |
| num_train_epochs=8, | |
| ``` | |
| ## How to Use the model: | |
| ```python | |
| from transformers import pipeline | |
| classifier = pipeline("sentiment-analysis",model='bhadresh-savani/bert-base-uncased-emotion') | |
| prediction = classifier("I love using transformers. The best part is wide range of support and its easy to use") | |
| ``` | |
| ## Dataset: | |
| [Twitter-Sentiment-Analysis](https://huggingface.co/nlp/viewer/?dataset=emotion). | |
| ## Training procedure | |
| [Colab Notebook](https://github.com/bhadreshpsavani/ExploringSentimentalAnalysis/blob/main/SentimentalAnalysisWithDistilbert.ipynb) | |
| ## Eval results | |
| ``` | |
| { | |
| 'test_accuracy': 0.9355, | |
| 'test_f1': 0.9354074792391709, | |
| 'test_loss': 0.18557891249656677, | |
| 'test_runtime': 11.0092, | |
| 'test_samples_per_second': 181.666, | |
| 'test_steps_per_second': 2.907 | |
| } | |
| ``` |