mirror of
https://github.com/hexastack/hexabot
synced 2024-12-02 00:54:56 +00:00
Merge pull request #371 from Hexastack/fix/load-slot-classifier
Fix/load slot filler
This commit is contained in:
commit
431bdb4e8c
@ -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()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user