Skip to content

Commit

Permalink
fix refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
zehengl committed Oct 31, 2023
1 parent b2f84da commit 8df4227
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions streamlit_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,5 @@ def get_schools_sample(df):
):
st.write(f"You score {score} out of {total} {thumb}")

refresh = st.button("Refresh")
if refresh:
st.cache_data.clear()
st.rerun()

st.button("Refresh", on_click=st.cache_data.clear)

0 comments on commit 8df4227

Please sign in to comment.