Merge pull request #371 from Hexastack/fix/load-slot-classifier
Some checks failed
Build and Push Docker Images / paths-filter (push) Has been cancelled
Build and Push Docker Images / build-and-push (push) Has been cancelled

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()