debajyotimaz commited on
Commit
9237dcc
·
verified ·
1 Parent(s): 0a4e35e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -1
README.md CHANGED
@@ -19,10 +19,24 @@ This is the model card of a 🤗 transformers model that has been pushed on the
19
 
20
  - **Developed by:** Aakash Kumar, Debajyoti Mazumder, Jasabanta Patro
21
  - **Model type:** Text Classification
22
- - **Language(s) (NLP):** Hindi-English code-mixed
23
  - **Parent Model:** See the [BERT multilingual base model (cased)](https://huggingface.co/google-bert/bert-base-multilingual-cased) for more information about the model.
24
 
 
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  #### Metrics
28
 
 
19
 
20
  - **Developed by:** Aakash Kumar, Debajyoti Mazumder, Jasabanta Patro
21
  - **Model type:** Text Classification
22
+ - **Language(s) :** Hindi-English code-mixed
23
  - **Parent Model:** See the [BERT multilingual base model (cased)](https://huggingface.co/google-bert/bert-base-multilingual-cased) for more information about the model.
24
 
25
+ ## How to Get Started with the Model
26
 
27
+ **Details of usage**
28
+
29
+ Please use the **Model_Rational_Label** class inside [models.py](models.py) to load the models. The default prediction in this hosted inference API may be wrong due to the use of different class initialisations.
30
+
31
+ ```python
32
+ import torch
33
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
34
+ tokenizer = AutoTokenizer.from_pretrained("debajyotimaz/codemix_hate")
35
+ model = AutoModelForSequenceClassification.from_pretrained("debajyotimaz/codemix_hate")
36
+ inputs = tokenizer("Mai tumse hate karta hun", return_tensors="pt")
37
+ prediction= model(input_ids=inputs['input_ids'],attention_mask=inputs['attention_mask'])
38
+ print(prediction.logits)
39
+ ```
40
 
41
  #### Metrics
42