rbawden commited on
Commit
758e329
1 Parent(s): 3dddcd2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -6
README.md CHANGED
@@ -19,16 +19,16 @@ The model is designed to be used to normalise 17th c. French texts. The best per
19
  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).
20
 
21
  ```
22
- tokeniser = AutoTokenizer.from_pretrained("rbawden/modern_french_normalisation", use_auth_token=True)
23
- model = AutoModelForSeq2SeqLM.from_pretrained("rbawden/modern_french_normalisation", use_auth_token=True)
24
- normalisation_pipeline = NormalisationPipeline(model=model,
25
  tokenizer=tokeniser,
26
  batch_size=batch_size,
27
  beam_size=beam_size)
28
 
29
- list_sents = ["1. QVe cette propoſtion, qu'vn eſpace eſt vuidé, repugne au ſens commun.", Adieu, i'iray chez vous tantoſt vous rendre grace.]
30
- normalised_outputs = normalisation_pipeline(list_sents)
31
- print(normalised_outputs)
32
 
33
  >> ["1. QUe cette propôtion, qu'un espace est vidé, répugne au sens commun.", "Adieu, j'irai chez vous tantôt vous rendre grâce."]
34
  ```
 
19
  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).
20
 
21
  ```
22
+ tokeniser = AutoTokenizer.from_pretrained("rbawden/modern_french_normalisation")
23
+ model = AutoModelForSeq2SeqLM.from_pretrained("rbawden/modern_french_normalisation")
24
+ norm_pipeline = NormalisationPipeline(model=model,
25
  tokenizer=tokeniser,
26
  batch_size=batch_size,
27
  beam_size=beam_size)
28
 
29
+ list_inputs = ["1. QVe cette propoſtion, qu'vn eſpace eſt vuidé, repugne au ſens commun.", Adieu, i'iray chez vous tantoſt vous rendre grace.]
30
+ list_outputs = norm_pipeline(list_inputs)
31
+ print(list_outputs)
32
 
33
  >> ["1. QUe cette propôtion, qu'un espace est vidé, répugne au sens commun.", "Adieu, j'irai chez vous tantôt vous rendre grâce."]
34
  ```