gkdivya commited on
Commit
64947ac
·
1 Parent(s): 47a1844

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -60,10 +60,11 @@ def main_page(furniture_data):
60
  attributes = furniture_data['Furniture'][selected_category]['attributes']
61
  for attribute, options in attributes.items():
62
  st.multiselect(f'Choose {attribute}', options)
63
- # Create a multi-select widget for each attribute
 
64
  for attribute, options in attributes.items():
65
- selected_options[attribute] = st.multiselect(f'Choose {attribute}', options)
66
-
67
  filtered_images = filter_images(images_data, selected_options)
68
 
69
  if filtered_images:
 
60
  attributes = furniture_data['Furniture'][selected_category]['attributes']
61
  for attribute, options in attributes.items():
62
  st.multiselect(f'Choose {attribute}', options)
63
+
64
+ # Create a multi-select widget for each attribute with a unique key
65
  for attribute, options in attributes.items():
66
+ key = f"{selected_category}_{attribute}" # Unique key combining category and attribute
67
+ selected_options[attribute] = st.multiselect(f'Choose {attribute}', options, key=key)
68
  filtered_images = filter_images(images_data, selected_options)
69
 
70
  if filtered_images: