Commit
·
7ddc08e
1
Parent(s):
6514fd7
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,9 +6,9 @@ model_checkpoint = "MuntasirHossain/bert-finetuned-ner"
|
|
| 6 |
model = pipeline("token-classification", model=model_checkpoint, aggregation_strategy="simple")
|
| 7 |
|
| 8 |
|
| 9 |
-
def
|
| 10 |
-
|
| 11 |
-
return
|
| 12 |
|
| 13 |
description = "This AI model is trained to identify and classify named entities in unstructured text."
|
| 14 |
title = "Named Entity Recognition"
|
|
|
|
| 6 |
model = pipeline("token-classification", model=model_checkpoint, aggregation_strategy="simple")
|
| 7 |
|
| 8 |
|
| 9 |
+
def ner(text):
|
| 10 |
+
output = ner_pipeline(text)
|
| 11 |
+
return {"text": text, "entities": output}
|
| 12 |
|
| 13 |
description = "This AI model is trained to identify and classify named entities in unstructured text."
|
| 14 |
title = "Named Entity Recognition"
|