bonadossou commited on
Commit
398b249
1 Parent(s): a291d55

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -0
README.md CHANGED
@@ -24,6 +24,14 @@ Model | MasakhaNER | MasakhaNER2.0* | Text Classification (Yoruba/Hausa) | Senti
24
 
25
  **Models:**: [AfroLM-Large](https://huggingface.co/bonadossou/afrolm_active_learning) and **Dataset**: [AfroLM Dataset](https://huggingface.co/datasets/bonadossou/afrolm_active_learning_dataset)
26
 
 
 
 
 
 
 
 
 
27
  ## Reproducing our result: Training and Evaluation
28
 
29
  - To train the network, run `python active_learning.py`. You can also wrap it around a `bash` script.
 
24
 
25
  **Models:**: [AfroLM-Large](https://huggingface.co/bonadossou/afrolm_active_learning) and **Dataset**: [AfroLM Dataset](https://huggingface.co/datasets/bonadossou/afrolm_active_learning_dataset)
26
 
27
+ ## HuggingFace usage of AfroLM-large
28
+ ```python
29
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
30
+ model = AutoModelForTokenClassification.from_pretrained("bonadossou/afrolm_active_learning")
31
+ tokenizer = AutoTokenizer.from_pretrained("bonadossou/afrolm_active_learning")
32
+ tokenizer.model_max_length = 256
33
+ ```
34
+
35
  ## Reproducing our result: Training and Evaluation
36
 
37
  - To train the network, run `python active_learning.py`. You can also wrap it around a `bash` script.