JJFrancisco commited on
Commit
a30f996
1 Parent(s): 2d2d65c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -18,7 +18,8 @@ model_dir_gl_en = download_model("proxectonos/Nos_MT-OpenNMT-gl-en", revision="m
18
  model_dir_en_gl = download_model("proxectonos/Nos_MT-OpenNMT-en-gl", revision="main")
19
 
20
  def translate(input_text):
21
- command = f"onmt_translate -src input_text -model {os.path.join(MODELS_PATH, model_dir_en_gl)}/NOS-MT-OpenNMT-en-gl --output ./output_file.txt --replace_unk"
 
22
  process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
23
  stdout, stderr = process.communicate()
24
  if process.returncode != 0:
 
18
  model_dir_en_gl = download_model("proxectonos/Nos_MT-OpenNMT-en-gl", revision="main")
19
 
20
  def translate(input_text):
21
+ print input_text
22
+ command = f"onmt_translate -src {input_text} -model {os.path.join(MODELS_PATH, model_dir_en_gl)}/NOS-MT-OpenNMT-en-gl --output ./output_file.txt --replace_unk"
23
  process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
24
  stdout, stderr = process.communicate()
25
  if process.returncode != 0: