mirror of
https://github.com/hexastack/hexabot
synced 2024-11-26 13:51:20 +00:00
fix: model lang
This commit is contained in:
parent
c58a080ebf
commit
dab9d9f716
@ -102,10 +102,10 @@ class JISFDL(tfbp.DataLoader):
|
||||
lang = self.hparams.language
|
||||
all_examples = data["common_examples"]
|
||||
|
||||
if not lang:
|
||||
if not bool(lang):
|
||||
examples = all_examples
|
||||
else:
|
||||
examples = filter(lambda exp: any(not lang or (e['entity'] == 'language' and e['value'] == lang) for e in exp['entities']), all_examples)
|
||||
examples = filter(lambda exp: any(e['entity'] == 'language' and e['value'] == lang for e in exp['entities']), all_examples)
|
||||
|
||||
# Parse raw data
|
||||
for exp in examples:
|
||||
|
@ -38,7 +38,7 @@ BERT_MODEL_BY_LANGUAGE = {
|
||||
@tfbp.default_export
|
||||
class IntentClassifier(tfbp.Model):
|
||||
default_hparams = {
|
||||
"language": None,
|
||||
"language": "",
|
||||
"num_epochs": 2,
|
||||
"dropout_prob": 0.1,
|
||||
"intent_num_labels": 7,
|
||||
|
@ -38,7 +38,7 @@ BERT_MODEL_BY_LANGUAGE = {
|
||||
@tfbp.default_export
|
||||
class SlotFiller(tfbp.Model):
|
||||
default_hparams = {
|
||||
"language": None,
|
||||
"language": "",
|
||||
"num_epochs": 2,
|
||||
"dropout_prob": 0.1,
|
||||
"slot_num_labels": 40
|
||||
|
Loading…
Reference in New Issue
Block a user