broadwell commited on
Commit
aeb9d29
1 Parent(s): 62d2147

Adjust initialization sequence

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -87,7 +87,8 @@ def clip_search(search_query):
87
 
88
 
89
  def string_search():
90
- clip_search(st.session_state.search_field_value)
 
91
 
92
 
93
  def load_image_features():
@@ -179,7 +180,7 @@ if "images_info" not in st.session_state:
179
 
180
 
181
  def visualize_gradcam(viz_image_id):
182
- if not st.session_state.search_field_value:
183
  return
184
 
185
  header_cols = st.columns([80, 20], vertical_alignment="bottom")
 
87
 
88
 
89
  def string_search():
90
+ if "search_field_value" in st.session_state:
91
+ clip_search(st.session_state.search_field_value)
92
 
93
 
94
  def load_image_features():
 
180
 
181
 
182
  def visualize_gradcam(viz_image_id):
183
+ if "search_field_value" not in st.session_state:
184
  return
185
 
186
  header_cols = st.columns([80, 20], vertical_alignment="bottom")