Spaces:
Runtime error
Runtime error
harveen
commited on
Commit
·
c087ead
1
Parent(s):
4627dc1
Adding files
Browse files- app.py +10 -0
- requirements.txt +11 -0
app.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
!wget https://huggingface.co/datasets/Harveenchadha/ai4bharat-models/blob/main/en-indic.zip
|
| 2 |
+
!unzip indic-en.zip
|
| 3 |
+
|
| 4 |
+
from indicTrans.inference.engine import Model
|
| 5 |
+
indic2en_model = Model(expdir='indic-en')
|
| 6 |
+
|
| 7 |
+
ta_paragraph = """இத்தொற்றுநோய் உலகளாவிய சமூக மற்றும் பொருளாதார சீர்குலைவை ஏற்படுத்தியுள்ளது.இதனால் பெரும் பொருளாதார மந்தநிலைக்குப் பின்னர் உலகளவில் மிகப்பெரிய மந்தநிலை ஏற்பட்டுள்ளது. இது விளையாட்டு,மத, அரசியல் மற்றும் கலாச்சார நிகழ்வுகளை ஒத்திவைக்க அல்லது ரத்து செய்ய வழிவகுத்தது.
|
| 8 |
+
அச்சம் காரணமாக முகக்கவசம், கிருமிநாசினி உள்ளிட்ட பொருட்களை அதிக நபர்கள் வாங்கியதால் விநியோகப் பற்றாக்குறை ஏற்பட்டது."""
|
| 9 |
+
|
| 10 |
+
indic2en_model.translate_paragraph(ta_paragraph, 'ta', 'en')
|
requirements.txt
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
sacremoses
|
| 2 |
+
pandas
|
| 3 |
+
mock
|
| 4 |
+
sacrebleu
|
| 5 |
+
tensorboardX
|
| 6 |
+
pyarrow
|
| 7 |
+
indic-nlp-library
|
| 8 |
+
mosestokenizer
|
| 9 |
+
subword-nmt
|
| 10 |
+
git+https://github.com/pytorch/fairseq.git
|
| 11 |
+
|