Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ def load_model(selected_language, model_name=None, entity_set=None):
|
|
66 |
nlp_model_de.add_pipe("entityfishing")
|
67 |
|
68 |
return nlp_model_de
|
69 |
-
elif selected_language == "English":
|
70 |
# Load English-specific model
|
71 |
nlp_model_en = spacy.load("en_core_web_sm")
|
72 |
nlp_model_en.add_pipe("entityfishing")
|
@@ -107,7 +107,7 @@ entities_map = {}
|
|
107 |
entities_data = {}
|
108 |
|
109 |
if text_input:
|
110 |
-
if selected_language in ["German", "English - spaCy"]
|
111 |
doc_de = model(text_input)
|
112 |
entities = [(ent.text, ent.label_, ent._.kb_qid, ent._.url_wikidata) for ent in doc_de.ents]
|
113 |
for entity in entities:
|
|
|
66 |
nlp_model_de.add_pipe("entityfishing")
|
67 |
|
68 |
return nlp_model_de
|
69 |
+
elif selected_language == "English - spaCy":
|
70 |
# Load English-specific model
|
71 |
nlp_model_en = spacy.load("en_core_web_sm")
|
72 |
nlp_model_en.add_pipe("entityfishing")
|
|
|
107 |
entities_data = {}
|
108 |
|
109 |
if text_input:
|
110 |
+
if selected_language in ["German", "English - spaCy"]:
|
111 |
doc_de = model(text_input)
|
112 |
entities = [(ent.text, ent.label_, ent._.kb_qid, ent._.url_wikidata) for ent in doc_de.ents]
|
113 |
for entity in entities:
|