harveen commited on
Commit
87dca7d
1 Parent(s): 38a610b
Files changed (3) hide show
  1. .DS_Store +0 -0
  2. app.py +11 -0
  3. requirements.txt +1 -2
.DS_Store ADDED
Binary file (6.15 kB). View file
 
app.py CHANGED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ os.system('wget https://huggingface.co/datasets/Harveenchadha/ai4bharat-models/blob/main/en-indic.zip')
3
+ os.system('unzip /home/user/app/en-indic.zip')
4
+
5
+ from indicTrans.inference.engine import Model
6
+ indic2en_model = Model(expdir='en-indic')
7
+
8
+ ta_paragraph = """இத்தொற்றுநோய் உலகளாவிய சமூக மற்றும் பொருளாதார சீர்குலைவை ஏற்படுத்தியுள்ளது.இதனால் பெரும் பொருளாதார மந்தநிலைக்குப் பின்னர் உலகளவில் மிகப்பெரிய மந்தநிலை ஏற்பட்டுள்ளது. இது விளையாட்டு,மத, அரசியல் மற்றும் கலாச்சார நிகழ்வுகளை ஒத்திவைக்க அல்லது ரத்து செய்ய வழிவகுத்தது.
9
+ அச்சம் காரணமாக முகக்கவசம், கிருமிநாசினி உள்ளிட்ட பொருட்களை அதிக நபர்கள் வாங்கியதால் விநியோகப் பற்றாக்குறை ஏற்பட்டது."""
10
+
11
+ indic2en_model.translate_paragraph(ta_paragraph, 'ta', 'en')
requirements.txt CHANGED
@@ -7,5 +7,4 @@ pyarrow
7
  indic-nlp-library
8
  mosestokenizer
9
  subword-nmt
10
- git+https://github.com/pytorch/fairseq.git
11
-
 
7
  indic-nlp-library
8
  mosestokenizer
9
  subword-nmt
10
+ git+https://github.com/pytorch/fairseq.git