Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ st.set_page_config(
|
|
19 |
|
20 |
# Sidebar
|
21 |
st.sidebar.image("logo-wordlift.png")
|
22 |
-
language_options = {"
|
23 |
selected_language = st.sidebar.selectbox("Select the Language", list(language_options))
|
24 |
|
25 |
# Based on selected language, display model and entity set options
|
@@ -89,8 +89,8 @@ if text_input:
|
|
89 |
# Map entities to a format similar to English output
|
90 |
entities = [(ent.text, ent.label_, ent._.kb_qid, ent._.url_wikidata) for ent in doc_de.ents]
|
91 |
# Debug
|
92 |
-
for ent in doc_de.ents:
|
93 |
-
|
94 |
else:
|
95 |
entities = model.process_text(text_input)
|
96 |
|
|
|
19 |
|
20 |
# Sidebar
|
21 |
st.sidebar.image("logo-wordlift.png")
|
22 |
+
language_options = {"German", "English"}
|
23 |
selected_language = st.sidebar.selectbox("Select the Language", list(language_options))
|
24 |
|
25 |
# Based on selected language, display model and entity set options
|
|
|
89 |
# Map entities to a format similar to English output
|
90 |
entities = [(ent.text, ent.label_, ent._.kb_qid, ent._.url_wikidata) for ent in doc_de.ents]
|
91 |
# Debug
|
92 |
+
#for ent in doc_de.ents:
|
93 |
+
# st.write(f"Entity: {ent.text}, Label: {ent.label_}, QID: {ent._.kb_qid}, URL: {ent._.url_wikidata}")
|
94 |
else:
|
95 |
entities = model.process_text(text_input)
|
96 |
|