en2ur / usage.py
datasetsANDmodels's picture
Upload usage.py
fdf90f6 verified
raw
history blame
437 Bytes
from transformers import pipeline
#pipe= pipeline("translation", model="th2en")
#pipe= pipeline("translation", model="ur2en")
pipe= pipeline("translation", model="en2ur")
text ="ผมโทรมาจากสำนักงานสรรพากรครับ" #Thai
text="میں ٹیکس آفس سے کال کر رہا ہوں۔" #Urdu
text="I am calling from tax office"
result =pipe(text)
print( result[0]["translation_text"])