File size: 500 Bytes
87dca7d
c829c5b
4236010
c829c5b
100fa21
83470ae
3814228
 
87dca7d
627d9cd
1842d01
87dca7d
97dff50
87dca7d
97dff50
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import os

os.system('wget -q https://storage.googleapis.com/vakyaansh-open-models/translation_models/en-indic.zip')
os.system('unzip /home/user/app/en-indic.zip')
os.system('pip uninstall -y numpy')
os.system('pip install numpy==1.20 --user')

from fairseq import checkpoint_utils, distributed_utils, options, tasks, utils

from inference.engine import Model
indic2en_model = Model(expdir='en-indic')

ta_paragraph =  "hello how are you"

indic2en_model.translate_paragraph(ta_paragraph, 'en', 'hi')