Skip to content

Commit

Permalink
forgot the eval
Browse files Browse the repository at this point in the history
  • Loading branch information
BigEmperor26 committed Dec 15, 2023
1 parent e015cc1 commit 0246d68
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions manga_translator/translators/mbart50.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ async def _load(self, from_lang: str, to_lang: str, device: str):
self.model = MBartForConditionalGeneration.from_pretrained(self._TRANSLATOR_MODEL)
if self.device != 'cpu':
self.model.to(self.device)
self.model.eval()
self.tokenizer = AutoTokenizer.from_pretrained(self._TRANSLATOR_MODEL)

async def _unload(self):
Expand Down

0 comments on commit 0246d68

Please sign in to comment.