Update README.md
Browse files
README.md
CHANGED
@@ -20,6 +20,9 @@ The model is designed to be used to normalise 17th c. French texts. The best per
|
|
20 |
The model is to be used with the custom pipeline available in in the original repository [here](https://github.com/rbawden/ModFr-Norm/blob/main/hf-conversion/pipeline.py) and in this repository [here](https://huggingface.co/rbawden/modern_french_normalisation/blob/main/pipeline.py). You first need to download the pipeline file so that you can use it locally (since it is not integrated into HuggingFace).
|
21 |
|
22 |
```
|
|
|
|
|
|
|
23 |
tokeniser = AutoTokenizer.from_pretrained("rbawden/modern_french_normalisation")
|
24 |
model = AutoModelForSeq2SeqLM.from_pretrained("rbawden/modern_french_normalisation")
|
25 |
norm_pipeline = NormalisationPipeline(model=model, tokenizer=tokeniser, batch_size=batch_size,beam_size=beam_size)
|
|
|
20 |
The model is to be used with the custom pipeline available in in the original repository [here](https://github.com/rbawden/ModFr-Norm/blob/main/hf-conversion/pipeline.py) and in this repository [here](https://huggingface.co/rbawden/modern_french_normalisation/blob/main/pipeline.py). You first need to download the pipeline file so that you can use it locally (since it is not integrated into HuggingFace).
|
21 |
|
22 |
```
|
23 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
24 |
+
from pipeline import NormalisationPipeline # N.B. local file
|
25 |
+
|
26 |
tokeniser = AutoTokenizer.from_pretrained("rbawden/modern_french_normalisation")
|
27 |
model = AutoModelForSeq2SeqLM.from_pretrained("rbawden/modern_french_normalisation")
|
28 |
norm_pipeline = NormalisationPipeline(model=model, tokenizer=tokeniser, batch_size=batch_size,beam_size=beam_size)
|