Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,10 +25,9 @@ nlp = spacy.load(spacy_model)
|
|
| 25 |
# Add the NER pipeline from grc_ner_trf if the selected model is grc_proiel_trf or grc_perseus_trf
|
| 26 |
if spacy_model in ["grc_proiel_trf", "grc_perseus_trf"]:
|
| 27 |
ner = spacy.load("grc_ner_trf")
|
| 28 |
-
for pipe_name in ner.
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
doc = nlp(text)
|
| 33 |
|
| 34 |
def get_html(html: str):
|
|
|
|
| 25 |
# Add the NER pipeline from grc_ner_trf if the selected model is grc_proiel_trf or grc_perseus_trf
|
| 26 |
if spacy_model in ["grc_proiel_trf", "grc_perseus_trf"]:
|
| 27 |
ner = spacy.load("grc_ner_trf")
|
| 28 |
+
for pipe_name, pipe in ner.pipeline:
|
| 29 |
+
nlp.add_pipe(pipe, name=pipe_name, source=ner)
|
| 30 |
+
|
|
|
|
| 31 |
doc = nlp(text)
|
| 32 |
|
| 33 |
def get_html(html: str):
|