eaglelandsonce commited on
Commit
6415d2b
·
verified ·
1 Parent(s): 802215e

Update pages/21_NLP_Transformer.py

Browse files
Files changed (1) hide show
  1. pages/21_NLP_Transformer.py +1 -1
pages/21_NLP_Transformer.py CHANGED
@@ -22,7 +22,7 @@ batch_size = st.sidebar.slider("Batch Size", 4, 32, 8)
22
  learning_rate = st.sidebar.slider("Learning Rate", 1e-6, 1e-3, 5e-5, format="%.6f")
23
 
24
  # Define a custom hash function for AddedToken type
25
- @st.cache(allow_output_mutation=True, hash_funcs={tokenizer.__class__: id})
26
  def load_and_preprocess_data():
27
  dataset = load_dataset("imdb", split="train[:1%]")
28
  def preprocess_function(examples):
 
22
  learning_rate = st.sidebar.slider("Learning Rate", 1e-6, 1e-3, 5e-5, format="%.6f")
23
 
24
  # Define a custom hash function for AddedToken type
25
+ @st.cache_data(hash_funcs={tokenizer.__class__: id})
26
  def load_and_preprocess_data():
27
  dataset = load_dataset("imdb", split="train[:1%]")
28
  def preprocess_function(examples):