istassiy commited on
Commit
675d241
·
1 Parent(s): a93cb3e

commit from

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -39,12 +39,12 @@ sorted_arxiv_topics = sorted(set(arxiv_code_to_topic.values()))
39
 
40
  NUM_LABELS = len(sorted_arxiv_topics)
41
 
42
- @st.cache(hash_funcs={tokenizers.Tokenizer: id})
43
  def load_tokenizer():
44
  tokenizer = AutoTokenizer.from_pretrained(my_model_name)
45
  return tokenizer
46
 
47
- @st.cache(hash_funcs={tokenizers.Tokenizer: id})
48
  def load_model():
49
  model = AutoModel.from_pretrained(my_model_name)
50
  return model
 
39
 
40
  NUM_LABELS = len(sorted_arxiv_topics)
41
 
42
+ @st.cache(allow_output_mutation=True)
43
  def load_tokenizer():
44
  tokenizer = AutoTokenizer.from_pretrained(my_model_name)
45
  return tokenizer
46
 
47
+ @st.cache(allow_output_mutation=True)
48
  def load_model():
49
  model = AutoModel.from_pretrained(my_model_name)
50
  return model