Download usage.py from datasetsANDmodels/it2en: direct link, hf CLI and curl.
- Browser
- Download file 184 Bytes
-
https://huggingface.co/datasetsANDmodels/it2en/resolve/main/usage.py
- Command line
-
hf download hf://datasetsANDmodels/it2en/usage.py
-
curl -L -o usage.py https://huggingface.co/datasetsANDmodels/it2en/resolve/main/usage.py
184 Bytes
| from transformers import pipeline | |
| pipe= pipeline("translation", model="it2en") | |
| text="Sto chiamando dall'ufficio delle tasse." | |
| result =pipe(text) | |
| print( result[0]["translation_text"]) | |