Spaces:
Sleeping
Sleeping
JJFrancisco
commited on
Commit
•
20d2de6
1
Parent(s):
ab4061b
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
|
|
3 |
import subprocess
|
4 |
|
5 |
def translate(input_text):
|
6 |
-
command = f"onmt_translate -src {input_text} -model NOS-MT-en-gl
|
7 |
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
8 |
stdout, stderr = process.communicate()
|
9 |
if process.returncode != 0:
|
|
|
3 |
import subprocess
|
4 |
|
5 |
def translate(input_text):
|
6 |
+
command = f"onmt_translate -src {input_text} -model NOS-MT-OpenNMT-en-gl --output ./output_file.txt --replace_unk -gpu 0"
|
7 |
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
8 |
stdout, stderr = process.communicate()
|
9 |
if process.returncode != 0:
|