Spaces:
Sleeping
Sleeping
abdulmatinomotoso
commited on
Commit
•
5a85444
1
Parent(s):
42a117e
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,9 @@ from transformers import AutoTokenizer, AutoModelForTokenClassification
|
|
2 |
from transformers import pipeline
|
3 |
import gradio as gr
|
4 |
|
5 |
-
|
6 |
-
|
|
|
7 |
nlp = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
|
8 |
|
9 |
def rename_group(output_list):
|
|
|
2 |
from transformers import pipeline
|
3 |
import gradio as gr
|
4 |
|
5 |
+
model_name = "valurank/bert-base-NER"
|
6 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
7 |
+
model = AutoModelForTokenClassification.from_pretrained(model_name)
|
8 |
nlp = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
|
9 |
|
10 |
def rename_group(output_list):
|