diff --git a/translator/__init__.py b/translator/__init__.py index b2fa562..4b064a8 100644 --- a/translator/__init__.py +++ b/translator/__init__.py @@ -1,6 +1,6 @@ from translator.translate import Translator from translator.language import get_nllb_lang -__version__ = "0.2.6b2" +__version__ = "0.2.6b3" LANGS = get_nllb_lang() diff --git a/translator/main.py b/translator/main.py index 378f56b..3cc0594 100644 --- a/translator/main.py +++ b/translator/main.py @@ -165,8 +165,11 @@ def main(): translations += translate_sentence(_batch_text, translator) time_meanwhile = time.perf_counter() _td = time_meanwhile - _t + _td2 = time_meanwhile - time_before_3 _i += batch_size - _avg = batch_size/_td + _avg1 = batch_size/_td + _avg2 = _i/_td2 + _avg = (_avg1 + _avg2)/2 _eta = (_ut_ds - _i) / _avg spinner.text = f"[{_i:n}/{_ut_ds:n} ({_i/_ut_ds:.2%}) | ~{_avg:.2f} sentences / second | ETA : {datetime.timedelta(seconds=_eta)}]"