Download usage.py from datasetsANDmodels/sw2th: direct link, hf CLI and curl.
- Browser
- Download file 276 Bytes
-
https://huggingface.co/datasetsANDmodels/sw2th/resolve/main/usage.py
- Command line
-
hf download hf://datasetsANDmodels/sw2th/usage.py
-
curl -L -o usage.py https://huggingface.co/datasetsANDmodels/sw2th/resolve/main/usage.py
276 Bytes
| from transformers import pipeline | |
| pipe= pipeline("translation", model="sw2th") | |
| text="Jag ringer från skattekontoret."#SWIDISH | |
| #text="ผมโทรมาจากสํานักงานสรรพากร"#THAI | |
| result =pipe(text) | |
| print( result[0]["translation_text"]) | |