Skip to content

Commit

Permalink
v0.3.4b4
Browse files Browse the repository at this point in the history
  • Loading branch information
wasertech committed Jul 22, 2023
1 parent a419986 commit 4621e83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion translator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from translator.translate import Translator
from translator.language import get_nllb_lang

__version__ = "0.3.4b3"
__version__ = "0.3.4b4"

LANGS = get_nllb_lang()
2 changes: 1 addition & 1 deletion translator/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self, source_language, target_language, max_length=500, model_id="f
self.device = "cuda:0" if torch.cuda.is_available() else "cpu"
self.logger.debug(f"{self.device}")
self.logger.debug("Loading model...")
self.model = AutoModelForSeq2SeqLM.from_pretrained(model_id, model_max_length=max_length)
self.model = AutoModelForSeq2SeqLM.from_pretrained(model_id, max_length=max_length)
self.logger.debug("Loading tokenizer...")
self.tokenizer = AutoTokenizer.from_pretrained(model_id, model_max_length=max_length)
self.logger.debug("Setting up translation pipeline...")
Expand Down

0 comments on commit 4621e83

Please sign in to comment.