Update README.md
Browse files
README.md
CHANGED
@@ -71,7 +71,9 @@ model = AutoModelForTokenClassification.from_pretrained('roberthsu2003/models_fo
|
|
71 |
tokenizer = AutoTokenizer.from_pretrained('roberthsu2003/models_for_ner')
|
72 |
|
73 |
# The label mapping (you might need to adjust this based on your training)
|
74 |
-
|
|
|
|
|
75 |
|
76 |
def predict_ner(text):
|
77 |
"""Predicts NER tags for a given text using the loaded model."""
|
|
|
71 |
tokenizer = AutoTokenizer.from_pretrained('roberthsu2003/models_for_ner')
|
72 |
|
73 |
# The label mapping (you might need to adjust this based on your training)
|
74 |
+
#['O', 'B-PER', 'I-PER', 'B-ORG', 'I-ORG', 'B-LOC', 'I-LOC']
|
75 |
+
label_list = list(model.config.id2label.values())
|
76 |
+
|
77 |
|
78 |
def predict_ner(text):
|
79 |
"""Predicts NER tags for a given text using the loaded model."""
|