Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -108,8 +108,8 @@ entities_data = {}
|
|
108 |
|
109 |
if text_input:
|
110 |
if selected_language in ["German", "English - spaCy"]:
|
111 |
-
|
112 |
-
entities = [(ent.text, ent.label_, ent._.kb_qid, ent._.url_wikidata) for ent in
|
113 |
for entity in entities:
|
114 |
entity_string, entity_type, wikidata_id, wikidata_url = entity
|
115 |
if wikidata_url:
|
|
|
108 |
|
109 |
if text_input:
|
110 |
if selected_language in ["German", "English - spaCy"]:
|
111 |
+
doc = model(text_input)
|
112 |
+
entities = [(ent.text, ent.label_, ent._.kb_qid, ent._.url_wikidata) for ent in doc.ents]
|
113 |
for entity in entities:
|
114 |
entity_string, entity_type, wikidata_id, wikidata_url = entity
|
115 |
if wikidata_url:
|