Spaces:
Runtime error
Runtime error
File size: 260 Bytes
eeba00f 569cf30 f10310e 569cf30 f10310e 569cf30 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import streamlit as st
@st.experimental_memo
def foo(x):
return x**2
if st.button("Clear Foo"):
# Clear foo's memoized values:
foo.clear()
if st.button("Clear All"):
# Clear values from *all* memoized functions:
st.experimental_memo.clear() |