Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -236,22 +236,13 @@ def run_ontology_structure_analysis():
|
|
236 |
def run_entity_exploration():
|
237 |
st.title("Entity Exploration")
|
238 |
|
239 |
-
# Grab all entities from the graph
|
240 |
entities = [
|
241 |
node for node, attr in ontology_manager.graph.nodes(data=True)
|
242 |
if attr.get("type") == "instance"
|
243 |
]
|
244 |
entities = sorted(set(entities))
|
245 |
|
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 |
|
257 |
if selected_entity:
|
|
|
236 |
def run_entity_exploration():
|
237 |
st.title("Entity Exploration")
|
238 |
|
239 |
+
# Grab all entities from the graph
|
240 |
entities = [
|
241 |
node for node, attr in ontology_manager.graph.nodes(data=True)
|
242 |
if attr.get("type") == "instance"
|
243 |
]
|
244 |
entities = sorted(set(entities))
|
245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
selected_entity = st.selectbox("Select Entity", entities) if entities else None
|
247 |
|
248 |
if selected_entity:
|