Spaces:
Sleeping
Sleeping
joyinning
commited on
Commit
·
1a5189d
1
Parent(s):
847cc52
Remove the line to call the id2label_ner
Browse files- model_utils.py +0 -5
model_utils.py
CHANGED
@@ -92,11 +92,6 @@ def load_custom_model(model_dir, tokenizer_dir, id2label):
|
|
92 |
|
93 |
return model, tokenizer
|
94 |
|
95 |
-
|
96 |
-
# Load NER model and tokenizer
|
97 |
-
with open('models/id2label.pkl', 'rb') as f:
|
98 |
-
id2label_ner = pickle.load(f)
|
99 |
-
|
100 |
ner_model_dir = "joyinning/chatbot-info-extraction/models/bilstm_ner"
|
101 |
tokenizer_dir = "joyinning/chatbot-info-extraction/models/tokenizer"
|
102 |
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'}
|
|
|
92 |
|
93 |
return model, tokenizer
|
94 |
|
|
|
|
|
|
|
|
|
|
|
95 |
ner_model_dir = "joyinning/chatbot-info-extraction/models/bilstm_ner"
|
96 |
tokenizer_dir = "joyinning/chatbot-info-extraction/models/tokenizer"
|
97 |
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'}
|