Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
| 64 |
for attribute, options in attributes.items():
|
| 65 |
-
|
| 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:
|