Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -236,7 +236,7 @@ def run_ontology_structure_analysis():
|
|
236 |
def run_entity_exploration():
|
237 |
st.title("Entity Exploration")
|
238 |
|
239 |
-
#
|
240 |
entities = [
|
241 |
node for node, attr in ontology_manager.graph.nodes(data=True)
|
242 |
if attr.get("type") == "instance"
|
@@ -246,9 +246,11 @@ def run_entity_exploration():
|
|
246 |
# Debug info
|
247 |
st.write("Loaded entities:", entities)
|
248 |
st.write("Ontology classes:", ontology_manager.get_classes())
|
249 |
-
|
250 |
-
|
251 |
-
|
|
|
|
|
252 |
|
253 |
selected_entity = st.selectbox("Select Entity", entities) if entities else None
|
254 |
|
|
|
236 |
def run_entity_exploration():
|
237 |
st.title("Entity Exploration")
|
238 |
|
239 |
+
# Grab all entities from the graph (do not rely on the list in ontology["classes"])
|
240 |
entities = [
|
241 |
node for node, attr in ontology_manager.graph.nodes(data=True)
|
242 |
if attr.get("type") == "instance"
|
|
|
246 |
# Debug info
|
247 |
st.write("Loaded entities:", entities)
|
248 |
st.write("Ontology classes:", ontology_manager.get_classes())
|
249 |
+
|
250 |
+
with st.expander("Found instances", expanded=False):
|
251 |
+
for node, attr in ontology_manager.graph.nodes(data=True):
|
252 |
+
if attr.get("type") == "instance":
|
253 |
+
st.write("Found instance:", node, "of class:", attr.get("class_type"))
|
254 |
|
255 |
selected_entity = st.selectbox("Select Entity", entities) if entities else None
|
256 |
|