From c26e775fb832e7765c8c88da5df520bf512ccdaa Mon Sep 17 00:00:00 2001 From: Siddharth Singh Rana <91743459+NIXBLACK11@users.noreply.github.com> Date: Tue, 14 Nov 2023 16:12:41 +0530 Subject: [PATCH] Update validate_models.py --- laser_encoders/validate_models.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/laser_encoders/validate_models.py b/laser_encoders/validate_models.py index 102543c8..5ff1c80d 100644 --- a/laser_encoders/validate_models.py +++ b/laser_encoders/validate_models.py @@ -71,10 +71,7 @@ def get_language_code(self, language_list: dict, lang: str) -> str: def download_laser3(self, lang): lang = self.get_language_code(LASER3_LANGUAGE, lang) file_path = os.path.join(self.model_dir, f"laser3-{lang}.v1.pt") - if os.path.exists(file_path): - return False - else: - return True + return os.path.exists(file_path) def download_laser2(self): files = ["laser2.pt", "laser2.spm", "laser2.cvocab"]