From b071c5baa3f94f29392d5f7fe547dd56aad81c04 Mon Sep 17 00:00:00 2001 From: Mohamed Marrouchi Date: Mon, 25 Nov 2024 12:46:01 +0100 Subject: [PATCH 1/2] fix: typo --- nlu/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nlu/main.py b/nlu/main.py index 2de8f8d..ba16136 100644 --- a/nlu/main.py +++ b/nlu/main.py @@ -57,7 +57,7 @@ def load_slot_classifiers(): def load_models(): app.language_classifier = load_language_classifier() # type: ignore app.intent_classifiers = load_intent_classifiers() # type: ignore - app.slot_fillers = load_intent_classifiers() # type: ignore + app.slot_fillers = load_slot_classifiers() # type: ignore app = FastAPI() From 3968a5f6d3ef0be3c91d31288eb0003622e3d2d2 Mon Sep 17 00:00:00 2001 From: Mohamed Marrouchi Date: Mon, 25 Nov 2024 14:25:11 +0100 Subject: [PATCH 2/2] fix: load model name --- nlu/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nlu/main.py b/nlu/main.py index ba16136..9ecd4a1 100644 --- a/nlu/main.py +++ b/nlu/main.py @@ -43,8 +43,8 @@ def load_intent_classifiers(): logging.info(f'Successfully loaded the intent classifier {language} model') return intent_classifiers -def load_slot_classifiers(): - Model = tfbp.get_model("slot_classifier") +def load_slot_fillers(): + Model = tfbp.get_model("slot_filler") slot_fillers = {} for language in AVAILABLE_LANGUAGES: kwargs = {} @@ -57,7 +57,7 @@ def load_slot_classifiers(): def load_models(): app.language_classifier = load_language_classifier() # type: ignore app.intent_classifiers = load_intent_classifiers() # type: ignore - app.slot_fillers = load_slot_classifiers() # type: ignore + app.slot_fillers = load_slot_fillers() # type: ignore app = FastAPI()