Update app.py
Browse files
app.py
CHANGED
|
@@ -13,11 +13,11 @@ MODEL_NAME = "quickmt-en-vi"
|
|
| 13 |
|
| 14 |
def translate_text(text,progress=gr.Progress(track_tqdm=True)):
|
| 15 |
global t
|
| 16 |
-
model_path = Path("/
|
| 17 |
if not model_path.exists():
|
| 18 |
hf_download(
|
| 19 |
model_name="quickmt/" + MODEL_NAME,
|
| 20 |
-
output_dir=Path("/
|
| 21 |
)
|
| 22 |
try:
|
| 23 |
if t is None or str(input.model()) != str(Path(t.model_path).name):
|
|
|
|
| 13 |
|
| 14 |
def translate_text(text,progress=gr.Progress(track_tqdm=True)):
|
| 15 |
global t
|
| 16 |
+
model_path = Path("/tmp") / MODEL_NAME
|
| 17 |
if not model_path.exists():
|
| 18 |
hf_download(
|
| 19 |
model_name="quickmt/" + MODEL_NAME,
|
| 20 |
+
output_dir=Path("/tmp") / MODEL_NAME,
|
| 21 |
)
|
| 22 |
try:
|
| 23 |
if t is None or str(input.model()) != str(Path(t.model_path).name):
|