NotShrirang commited on
Commit
a865eda
·
1 Parent(s): ce1d78a

fix: images directory validation in data search page

Browse files
Files changed (1) hide show
  1. data_search/data_search_page.py +5 -0
data_search/data_search_page.py CHANGED
@@ -21,6 +21,11 @@ def data_search(clip_model, preprocess, text_embedding_model, device):
21
 
22
  st.title("Data Search")
23
 
 
 
 
 
 
24
  annotation_projects = get_local_files("annotations/", get_details=True)
25
 
26
  if annotation_projects or st.session_state.get('selected_annotation_project', None) is not None:
 
21
 
22
  st.title("Data Search")
23
 
24
+ images = os.listdir("images/")
25
+ if images == []:
26
+ st.warning("No images found in the data directory.")
27
+ return
28
+
29
  annotation_projects = get_local_files("annotations/", get_details=True)
30
 
31
  if annotation_projects or st.session_state.get('selected_annotation_project', None) is not None: