added more text for less errors
Browse files
app.py
CHANGED
@@ -75,6 +75,7 @@ def main():
|
|
75 |
df, total_rows = load_dataset_with_limit(dataset_name, st.session_state.dataset_number, st.session_state.search_in_small_objects, limit=1)
|
76 |
dataset_limit = st.slider("Size of Dataset to be searched from", min_value=0, max_value=min(total_rows, 80000), value=int(min(total_rows, 80000)/2))
|
77 |
st.text(f'The smaller the dataset the faster the search will work.')
|
|
|
78 |
|
79 |
|
80 |
# Load dataset with limit only if not already loaded
|
@@ -112,7 +113,8 @@ def main():
|
|
112 |
|
113 |
# Search button
|
114 |
if st.button("Search"):
|
115 |
-
|
|
|
116 |
st.warning("You have not selected a Dataset. Please click on Load Dataset to load your respective Dataset")
|
117 |
# Validate input
|
118 |
if not query:
|
@@ -130,14 +132,16 @@ def main():
|
|
130 |
results = search(query, df, limit)
|
131 |
top_k_paths = get_file_paths(df, results)
|
132 |
top_k_cordinates = get_cordinates(df, results)
|
|
|
133 |
else:
|
134 |
# Normal Search
|
135 |
results = search(query, df, limit)
|
136 |
top_k_paths = get_file_paths(df, results)
|
|
|
137 |
|
138 |
# Complete the search progress
|
139 |
search_progress_bar.progress(100)
|
140 |
-
search_loading_text.text("Search completed
|
141 |
|
142 |
# Load Images with Bounding Boxes if applicable
|
143 |
if st.session_state.search_in_small_objects and top_k_paths and top_k_cordinates:
|
|
|
75 |
df, total_rows = load_dataset_with_limit(dataset_name, st.session_state.dataset_number, st.session_state.search_in_small_objects, limit=1)
|
76 |
dataset_limit = st.slider("Size of Dataset to be searched from", min_value=0, max_value=min(total_rows, 80000), value=int(min(total_rows, 80000)/2))
|
77 |
st.text(f'The smaller the dataset the faster the search will work.')
|
78 |
+
st.text('Please click Load Dataset to finalise selection for search')
|
79 |
|
80 |
|
81 |
# Load dataset with limit only if not already loaded
|
|
|
113 |
|
114 |
# Search button
|
115 |
if st.button("Search"):
|
116 |
+
#Ensure Dataset is selected
|
117 |
+
if st.session_state.df = None:
|
118 |
st.warning("You have not selected a Dataset. Please click on Load Dataset to load your respective Dataset")
|
119 |
# Validate input
|
120 |
if not query:
|
|
|
132 |
results = search(query, df, limit)
|
133 |
top_k_paths = get_file_paths(df, results)
|
134 |
top_k_cordinates = get_cordinates(df, results)
|
135 |
+
search_type = 'Splits'
|
136 |
else:
|
137 |
# Normal Search
|
138 |
results = search(query, df, limit)
|
139 |
top_k_paths = get_file_paths(df, results)
|
140 |
+
search_type = 'Main'
|
141 |
|
142 |
# Complete the search progress
|
143 |
search_progress_bar.progress(100)
|
144 |
+
search_loading_text.text(f"Search completed among {dataset_limit} for {dataset_name} in {search_type} {st.session_state.dataset_number}")
|
145 |
|
146 |
# Load Images with Bounding Boxes if applicable
|
147 |
if st.session_state.search_in_small_objects and top_k_paths and top_k_cordinates:
|