mahwizzzz/ur_financial_phrasebank
Viewer • Updated • 2.26k • 9
How to use mahwizzzz/UrduSentimentClassification with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="mahwizzzz/UrduSentimentClassification") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("mahwizzzz/UrduSentimentClassification")
model = AutoModelForSequenceClassification.from_pretrained("mahwizzzz/UrduSentimentClassification")# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("mahwizzzz/UrduSentimentClassification")
model = AutoModelForSequenceClassification.from_pretrained("mahwizzzz/UrduSentimentClassification")This model is a fine-tuned version of urduhack/roberta-urdu-small on Financial dataset. It achieves the following results on the evaluation set:
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 0.4931 | 1.96 | 500 | 0.5585 |
| 0.2415 | 3.92 | 1000 | 0.3782 |
| 0.1116 | 5.88 | 1500 | 0.6486 |
| 0.0357 | 7.84 | 2000 | 0.4853 |
| 0.0101 | 9.8 | 2500 | 0.4924 |
Base model
urduhack/roberta-urdu-small
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="mahwizzzz/UrduSentimentClassification")