Spaces:
Sleeping
Sleeping
joyinning
commited on
Commit
·
3d1e4e5
1
Parent(s):
6e63f19
Fix model and tokenizer paths
Browse files- model_utils.py +2 -2
model_utils.py
CHANGED
@@ -85,8 +85,8 @@ def load_custom_model(model_dir, tokenizer_dir, id2label):
|
|
85 |
|
86 |
return model, tokenizer
|
87 |
|
88 |
-
ner_model_dir = "/
|
89 |
-
tokenizer_dir = "/
|
90 |
id2label_ner = {0: 'O', 1: 'I-art', 2: 'B-org', 3: 'B-geo', 4: 'I-per', 5: 'B-eve', 6: 'I-geo', 7: 'B-per', 8: 'I-nat', 9: 'B-art', 10: 'B-tim', 11: 'I-gpe', 12: 'I-tim', 13: 'B-nat', 14: 'B-gpe', 15: 'I-org', 16: 'I-eve'}
|
91 |
ner_model, ner_tokenizer = load_custom_model(ner_model_dir, tokenizer_dir, id2label_ner)
|
92 |
|
|
|
85 |
|
86 |
return model, tokenizer
|
87 |
|
88 |
+
ner_model_dir = "joyinning/chatbot-info-extraction/models/bilstm_ner"
|
89 |
+
tokenizer_dir = "joyinning/chatbot-info-extraction/models/tokenizer"
|
90 |
id2label_ner = {0: 'O', 1: 'I-art', 2: 'B-org', 3: 'B-geo', 4: 'I-per', 5: 'B-eve', 6: 'I-geo', 7: 'B-per', 8: 'I-nat', 9: 'B-art', 10: 'B-tim', 11: 'I-gpe', 12: 'I-tim', 13: 'B-nat', 14: 'B-gpe', 15: 'I-org', 16: 'I-eve'}
|
91 |
ner_model, ner_tokenizer = load_custom_model(ner_model_dir, tokenizer_dir, id2label_ner)
|
92 |
|