1
0
mirror of https://github.com/hexastack/hexabot synced 2025-04-27 09:49:42 +00:00

Merge pull request from Hexastack/fix/load-slot-classifier

Fix/load slot filler
This commit is contained in:
Med Marrouchi 2024-11-25 14:31:04 +01:00 committed by GitHub
commit 431bdb4e8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,8 +43,8 @@ def load_intent_classifiers():
logging.info(f'Successfully loaded the intent classifier {language} model') logging.info(f'Successfully loaded the intent classifier {language} model')
return intent_classifiers return intent_classifiers
def load_slot_classifiers(): def load_slot_fillers():
Model = tfbp.get_model("slot_classifier") Model = tfbp.get_model("slot_filler")
slot_fillers = {} slot_fillers = {}
for language in AVAILABLE_LANGUAGES: for language in AVAILABLE_LANGUAGES:
kwargs = {} kwargs = {}
@ -57,7 +57,7 @@ def load_slot_classifiers():
def load_models(): def load_models():
app.language_classifier = load_language_classifier() # type: ignore app.language_classifier = load_language_classifier() # type: ignore
app.intent_classifiers = load_intent_classifiers() # type: ignore app.intent_classifiers = load_intent_classifiers() # type: ignore
app.slot_fillers = load_intent_classifiers() # type: ignore app.slot_fillers = load_slot_fillers() # type: ignore
app = FastAPI() app = FastAPI()