musfiqdehan commited on
Commit
e6fb89b
1 Parent(s): c313f4e

Refactor translation functions to include target language code

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -17,13 +17,13 @@ def process_alignments(src, language_name, model_name):
17
 
18
  src = space_punc(src)
19
 
20
- tgt = select_target_lang_code(language_name)
21
 
22
- tgt = get_better_translation(src)
23
 
24
  tgt = space_punc(tgt)
25
 
26
- tgt_base = google_translation(src, tgt)
27
 
28
  model_name = select_model(model_name)
29
 
 
17
 
18
  src = space_punc(src)
19
 
20
+ tgt_lang_code = select_target_lang_code(language_name)
21
 
22
+ tgt = get_better_translation(src, tgt_lang_code)
23
 
24
  tgt = space_punc(tgt)
25
 
26
+ tgt_base = google_translation(src, tgt_lang_code)
27
 
28
  model_name = select_model(model_name)
29