diff --git a/requirements.txt b/requirements.txt index b13ac27..77a43d3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ -torch~=1.10.0 -torchtext~=0.11.0 +torch~=1.11.0 +torchtext~=0.12.0 tqdm~=4.62.3 -numpy~=1.20.3 -indictrans~=1.2.3 +numpy~=1.21.0 +#indictrans~=1.2.3 streamlit~=1.2.0 pandas~=1.3.4 altair~=4.1.0 @@ -11,4 +11,4 @@ setuptools~=58.0.4 cython~=0.29.24 six~=1.16.0 scipy~=1.7.2 -nltk~=3.6.5 \ No newline at end of file +nltk~=3.6.5 diff --git a/src/LanguageIdentifier.py b/src/LanguageIdentifier.py index 7a8ebe1..8b0e012 100644 --- a/src/LanguageIdentifier.py +++ b/src/LanguageIdentifier.py @@ -10,9 +10,9 @@ class LanguageIdentifier: """ Word-level language identifier """ - def __init__(self, directory_path: Path = "./trained_models/trained_LID_model.pth"): + def __init__(self, directory_path: Path = "../trained_models/trained_LID_model.pth"): model_information_dict = torch.load(directory_path) - subword_to_idx = sentencepiece_numericalizer(load_sp_model('./sentpiece_resources/spm_user.model')) + subword_to_idx = sentencepiece_numericalizer(load_sp_model('../sentpiece_resources/spm_user.model')) lang_to_idx = {'bn': 0, 'en': 1, 'univ': 2, 'ne': 3, 'hi': 4, 'acro': 5, 'mixed': 6, 'undef': 7} self.model = LSTMLIDModel(subword_to_idx, lang_to_idx, model_information_dict['embedding_dim'],