Update modules/translation/translation_base.py
Browse files
modules/translation/translation_base.py
CHANGED
|
@@ -9,7 +9,6 @@ from modules.whisper.whisper_parameter import *
|
|
| 9 |
from modules.utils.subtitle_manager import *
|
| 10 |
from modules.utils.files_manager import load_yaml, save_yaml
|
| 11 |
from modules.utils.paths import DEFAULT_PARAMETERS_CONFIG_PATH, NLLB_MODELS_DIR, TRANSLATION_OUTPUT_DIR
|
| 12 |
-
from modules.translation.nllb_inference import NLLBInference
|
| 13 |
|
| 14 |
class TranslationBase(ABC):
|
| 15 |
def __init__(self,
|
|
@@ -172,10 +171,7 @@ class TranslationBase(ABC):
|
|
| 172 |
"""
|
| 173 |
try:
|
| 174 |
self.cache_parameters(model_size=model_size,src_lang=src_lang,tgt_lang=tgt_lang,max_length=max_length,add_timestamp=add_timestamp)
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
NLLBInferenceInstance = NLLBInference()
|
| 178 |
-
NLLBInferenceInstance.update_model(model_size=model_size,src_lang=src_lang,tgt_lang=tgt_lang,progress=progress)
|
| 179 |
|
| 180 |
total_progress = len(input_list_dict)
|
| 181 |
for index, dic in enumerate(input_list_dict):
|
|
|
|
| 9 |
from modules.utils.subtitle_manager import *
|
| 10 |
from modules.utils.files_manager import load_yaml, save_yaml
|
| 11 |
from modules.utils.paths import DEFAULT_PARAMETERS_CONFIG_PATH, NLLB_MODELS_DIR, TRANSLATION_OUTPUT_DIR
|
|
|
|
| 12 |
|
| 13 |
class TranslationBase(ABC):
|
| 14 |
def __init__(self,
|
|
|
|
| 171 |
"""
|
| 172 |
try:
|
| 173 |
self.cache_parameters(model_size=model_size,src_lang=src_lang,tgt_lang=tgt_lang,max_length=max_length,add_timestamp=add_timestamp)
|
| 174 |
+
self.update_model(model_size=model_size,src_lang=src_lang,tgt_lang=tgt_lang,progress=progress)
|
|
|
|
|
|
|
|
|
|
| 175 |
|
| 176 |
total_progress = len(input_list_dict)
|
| 177 |
for index, dic in enumerate(input_list_dict):
|