File size: 777 Bytes
25bede7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

from transformers import pipeline
#pipe= pipeline("translation", model="th2en")
#pipe= pipeline("translation", model="ur2en")
pipe= pipeline("translation", model="sv2th")
#text ="ผมโทรมาจากสำนักงานสรรพากรครับ"  #Thai
#text="میں ٹیکس آفس سے کال کر رہا ہوں۔" #Urdu
text="I am calling from tax office"
#text= "मैं कर कार्यालय से फोन कर रहा हूँ"# HINDI
#text="Jeg ringer fra skattekontoret"
text="Jag ringer från skattekontoret."#SWIDISH
#text="ผมโทรมาจากสํานักงานสรรพากร"#THAI
#text="저는 세무서에서 전화하고 있습니다."
result =pipe(text)
print( result[0]["translation_text"])