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')
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_intent_classifiers() # type: ignore
app.slot_fillers = load_slot_fillers() # type: ignore
app = FastAPI()