JJFrancisco commited on
Commit
1bb1c0a
1 Parent(s): 696fe3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,12 +2,12 @@ import gradio as gr
2
 
3
  import subprocess
4
 
5
- model_dir_en_gl = download_model("proxectonos/Nos_MT-OpenNMT-en-gl", revision="main")
6
 
7
  # NOS-MT-en-gl.p
8
 
9
  def translate(input_text):
10
- command = f"onmt_translate -src {input_text} -model model_dir_en_gl --output ./output_file.txt --replace_unk -gpu 0"
11
  process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
12
  stdout, stderr = process.communicate()
13
  if process.returncode != 0:
 
2
 
3
  import subprocess
4
 
5
+ #model_dir_en_gl = download_model("proxectonos/Nos_MT-OpenNMT-en-gl", revision="main")
6
 
7
  # NOS-MT-en-gl.p
8
 
9
  def translate(input_text):
10
+ command = f"onmt_translate -src {input_text} -model proxectonos/Nos_MT-OpenNMT-en-gl --output ./output_file.txt --replace_unk -gpu 0"
11
  process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
12
  stdout, stderr = process.communicate()
13
  if process.returncode != 0: