AD2000X commited on
Commit
551baba
verified
1 Parent(s): 20800fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
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 = None # <-- 瀹夊叏瀹e憡锛岄伩鍏嶆湭瀹氱京閷
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
- else:
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: