|
--- |
|
library_name: transformers |
|
language: |
|
- en |
|
- hi |
|
--- |
|
|
|
# Model Card for Model ID |
|
|
|
<!-- Provide a quick summary of what the model is/does. --> |
|
|
|
|
|
|
|
## Model Details |
|
|
|
### Model Description |
|
|
|
<!-- Provide a longer summary of what this model is. --> |
|
|
|
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model is for Hindi-English code-mixed hate detection. |
|
|
|
- **Developed by:** Aakash Kumar, Debajyoti Mazumder, Jasabanta Patro |
|
- **Model type:** Text Classification |
|
- **Language(s) :** Hindi-English code-mixed |
|
- **Parent Model:** See the [BERT multilingual base model (cased)](https://huggingface.co/google-bert/bert-base-multilingual-cased) for more information about the model. |
|
|
|
## How to Get Started with the Model |
|
|
|
**Details of usage** |
|
|
|
|
|
```python |
|
import torch |
|
from transformers import AutoTokenizer, AutoModelForSequenceClassification |
|
tokenizer = AutoTokenizer.from_pretrained("debajyotimaz/codemix_hate") |
|
model = AutoModelForSequenceClassification.from_pretrained("debajyotimaz/codemix_hate") |
|
inputs = tokenizer("Mai tumse hate karta hun", return_tensors="pt") |
|
prediction= model(input_ids=inputs['input_ids'],attention_mask=inputs['attention_mask']) |
|
print(prediction.logits) |
|
``` |
|
|
|
#### Metrics |
|
|
|
<!-- These are the evaluation metrics being used, ideally with a description of why. --> |
|
We use the F1 score of positive class as the evaluation metric for training of our model because it takes into account the Acc, Pre and Rec values. |