nan-dre commited on
Commit
3ed9d82
1 Parent(s): c75183b

Replace cache_resource with cache

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -26,7 +26,7 @@ def typical_sampling(model, input_ids, attention_mask, no_repeat_ngram_size, max
26
  )
27
 
28
 
29
- @st.cache_resource
30
  def setModel():
31
  model = AutoModelForCausalLM.from_pretrained(MODEL)
32
  tokenizer = AutoTokenizer.from_pretrained(TOKENIZER)
 
26
  )
27
 
28
 
29
+ @st.cache(allow_output_mutation=True)
30
  def setModel():
31
  model = AutoModelForCausalLM.from_pretrained(MODEL)
32
  tokenizer = AutoTokenizer.from_pretrained(TOKENIZER)