mirror of
https://github.com/illian64/llm-translate.git
synced 2026-04-30 21:00:10 +00:00
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:
parent
87925146c3
commit
323458ca27
44 changed files with 974 additions and 369 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue