Documentation, docker

* Prepare for docker, documentation.

* Prepare for docker, documentation.

* Prepare for docker, documentation.

---------

Co-authored-by: APodoinikov <APodoynikov@detmir.ru>
This commit is contained in:
illian64 2025-09-21 08:59:55 +07:00 committed by GitHub
parent 87925146c3
commit 323458ca27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 974 additions and 369 deletions

View file

@ -67,7 +67,8 @@ def translate(core: AppCore, ts: TranslateStruct):
tokenizers[from_lang] = AutoTokenizer.from_pretrained(options["model"], src_lang=from_lang)
tokenizer = tokenizers[from_lang]
# translate_batch not optimal, but there are problems with try to implement batch processing like madlab_ctranslate2
# translate_batch in this implementation not optimal,
# but there are problems with try to implement batch processing like madlab_ctranslate2
for part in tqdm(ts.parts, unit=params.tp.unit, ascii=params.tp.ascii, desc=params.tp.desc):
if part.need_to_translate():
input_text = part.text