Emanuela Boros
commited on
Commit
•
b7b6432
1
Parent(s):
7e20248
Add nltk req
Browse files
app.py
CHANGED
@@ -11,6 +11,22 @@ get_completion = pipeline(
|
|
11 |
token=token,
|
12 |
)
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
def ner(input):
|
16 |
output = get_completion(input)
|
|
|
11 |
token=token,
|
12 |
)
|
13 |
|
14 |
+
#
|
15 |
+
# PIPELINE_REGISTRY.register_pipeline(
|
16 |
+
# "newsagency-ner",
|
17 |
+
# pipeline_class=NewsAgencyModelPipeline,
|
18 |
+
# pt_model=AutoModelForTokenClassification,
|
19 |
+
# )
|
20 |
+
# model.config.custom_pipelines = {
|
21 |
+
# "newsagency-ner": {
|
22 |
+
# "impl": "newsagency_ner.NewsAgencyModelPipeline",
|
23 |
+
# "pt": ["BertForTokenClassification"],
|
24 |
+
# "tf": [],
|
25 |
+
# }
|
26 |
+
# }
|
27 |
+
#
|
28 |
+
# classifier = pipeline("newsagency-ner", model=model, tokenizer=tokenizer)
|
29 |
+
|
30 |
|
31 |
def ner(input):
|
32 |
output = get_completion(input)
|