Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -252,10 +252,7 @@ def run_entity_exploration():
|
|
252 |
if attr.get("type") == "instance":
|
253 |
st.write("Found instance:", node, "of class:", attr.get("class_type"))
|
254 |
|
255 |
-
selected_entity =
|
256 |
-
|
257 |
-
if entities:
|
258 |
-
selected_entity = st.selectbox("Select Entity", entities)
|
259 |
|
260 |
if selected_entity:
|
261 |
entity_info = ontology_manager.get_entity_info(selected_entity)
|
@@ -272,7 +269,7 @@ def run_entity_exploration():
|
|
272 |
max_distance=max_distance,
|
273 |
include_classes=True
|
274 |
)
|
275 |
-
|
276 |
st.warning("No entities found in the ontology.")
|
277 |
|
278 |
if selected_entity:
|
|
|
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:
|
258 |
entity_info = ontology_manager.get_entity_info(selected_entity)
|
|
|
269 |
max_distance=max_distance,
|
270 |
include_classes=True
|
271 |
)
|
272 |
+
elif not entities:
|
273 |
st.warning("No entities found in the ontology.")
|
274 |
|
275 |
if selected_entity:
|