santoshtyss commited on
Commit
acae3db
·
1 Parent(s): 449d751

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +37 -1
app.py CHANGED
@@ -103,7 +103,43 @@ def translate_sentence(article, source, target):
103
  output = translator(article, max_length=400)
104
  output = output[0]['translation_text']
105
  return output
106
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
 
108
  codes_as_string = codes_as_string.split('\n')
109
 
 
103
  output = translator(article, max_length=400)
104
  output = output[0]['translation_text']
105
  return output
106
+
107
+
108
+ codes_as_string = '''Modern Standard Arabic arb_Arab
109
+ Danish dan_Latn
110
+ German deu_Latn
111
+ Greek ell_Grek
112
+ English eng_Latn
113
+ Estonian est_Latn
114
+ Finnish fin_Latn
115
+ French fra_Latn
116
+ Hebrew heb_Hebr
117
+ Hindi hin_Deva
118
+ Croatian hrv_Latn
119
+ Hungarian hun_Latn
120
+ Indonesian ind_Latn
121
+ Icelandic isl_Latn
122
+ Italian ita_Latn
123
+ Japanese jpn_Jpan
124
+ Korean kor_Hang
125
+ Luxembourgish ltz_Latn
126
+ Macedonian mkd_Cyrl
127
+ Maltese mlt_Latn
128
+ Dutch nld_Latn
129
+ Norwegian Bokmål nob_Latn
130
+ Polish pol_Latn
131
+ Portuguese por_Latn
132
+ Russian rus_Cyrl
133
+ Slovak slk_Latn
134
+ Slovenian slv_Latn
135
+ Spanish spa_Latn
136
+ Serbian srp_Cyrl
137
+ Swedish swe_Latn
138
+ Thai tha_Thai
139
+ Turkish tur_Latn
140
+ Ukrainian ukr_Cyrl
141
+ Vietnamese vie_Latn
142
+ Chinese (Simplified) zho_Hans'''
143
 
144
  codes_as_string = codes_as_string.split('\n')
145