Update README.md
Browse files
README.md
CHANGED
@@ -214,10 +214,10 @@ If you use this model for your research, please cite the following work:
|
|
214 |
## How to download this model using python
|
215 |
|
216 |
- Install Python https://www.python.org/downloads/
|
217 |
-
- cmd
|
218 |
-
- python --version
|
219 |
-
- python -m pip install huggingface_hub
|
220 |
-
- python
|
221 |
|
222 |
```
|
223 |
import huggingface_hub
|
@@ -228,9 +228,9 @@ huggingface_hub.download_snapshot('entai2965/small100-ctranslate2',local_dir='sm
|
|
228 |
|
229 |
- https://opennmt.net/CTranslate2/guides/transformers.html#m2m-100
|
230 |
- https://huggingface.co/alirezamsh/small100
|
231 |
-
- cmd
|
232 |
-
- python -m pip install ctranslate2 transformers sentencepiece
|
233 |
-
- python
|
234 |
|
235 |
```
|
236 |
import sys
|
@@ -247,7 +247,6 @@ string1='जीवन एक चॉकलेट बॉक्स की तरह
|
|
247 |
translator=ctranslate2.Translator(model_path,device='cpu')
|
248 |
tokenizer=SMALL100Tokenizer.from_pretrained(model_path, clean_up_tokenization_spaces=True)
|
249 |
|
250 |
-
tokenizer.src_lang='hi'
|
251 |
tokenizer.tgt_lang='es'
|
252 |
target_language_token=[tokenizer.lang_code_to_token['es']]
|
253 |
|
|
|
214 |
## How to download this model using python
|
215 |
|
216 |
- Install Python https://www.python.org/downloads/
|
217 |
+
- `cmd`
|
218 |
+
- `python --version`
|
219 |
+
- `python -m pip install huggingface_hub`
|
220 |
+
- `python`
|
221 |
|
222 |
```
|
223 |
import huggingface_hub
|
|
|
228 |
|
229 |
- https://opennmt.net/CTranslate2/guides/transformers.html#m2m-100
|
230 |
- https://huggingface.co/alirezamsh/small100
|
231 |
+
- `cmd`
|
232 |
+
- `python -m pip install ctranslate2 transformers sentencepiece`
|
233 |
+
- `python`
|
234 |
|
235 |
```
|
236 |
import sys
|
|
|
247 |
translator=ctranslate2.Translator(model_path,device='cpu')
|
248 |
tokenizer=SMALL100Tokenizer.from_pretrained(model_path, clean_up_tokenization_spaces=True)
|
249 |
|
|
|
250 |
tokenizer.tgt_lang='es'
|
251 |
target_language_token=[tokenizer.lang_code_to_token['es']]
|
252 |
|