Skip to content

Commit

Permalink
Add the cache decorator to the function and the newly required variab…
Browse files Browse the repository at this point in the history
…les.
  • Loading branch information
hreikin committed Mar 9, 2023
1 parent 6555495 commit fb48218
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/streamlit_uploads_library/gallery.py
Expand Up @@ -9,5 +9,6 @@ def __init__(self, directory, file_extensions=(".png", ".jpg", ".jpeg"), number_
def fetch_files(self):
return super().fetch_files()

@st.cache_resource(experimental_allow_widgets=True, show_spinner="Refreshing gallery...")
def create_gallery(_self):
return super().create_library()
return super().create_library(_self.number_of_columns, _self.show_details)

0 comments on commit fb48218

Please sign in to comment.