Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -92,6 +92,9 @@ if text_input:
|
|
92 |
doc_de = model(text_input)
|
93 |
# Map entities to a format similar to English output
|
94 |
entities = [(ent.text, ent.label_, ent._.kb_qid, ent._.url_wikidata) for ent in doc_de.ents]
|
|
|
|
|
|
|
95 |
else:
|
96 |
entities = model.process_text(text_input)
|
97 |
|
|
|
92 |
doc_de = model(text_input)
|
93 |
# Map entities to a format similar to English output
|
94 |
entities = [(ent.text, ent.label_, ent._.kb_qid, ent._.url_wikidata) for ent in doc_de.ents]
|
95 |
+
# Debug
|
96 |
+
for ent in doc_de.ents:
|
97 |
+
st.write(f"Entity: {ent.text}, Label: {ent.label_}, QID: {ent._.kb_qid}, URL: {ent._.url_wikidata}")
|
98 |
else:
|
99 |
entities = model.process_text(text_input)
|
100 |
|