codelion commited on
Commit
c3619f4
·
verified ·
1 Parent(s): 527fe87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,7 +6,8 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
6
  checkpoint = "."
7
 
8
  tokenizer = AutoTokenizer.from_pretrained(checkpoint)
9
- @st.cache
 
10
  def load_model(model_name):
11
  model = AutoModelForCausalLM.from_pretrained(model_name)
12
  return model
 
6
  checkpoint = "."
7
 
8
  tokenizer = AutoTokenizer.from_pretrained(checkpoint)
9
+
10
+ @st.cache_resource
11
  def load_model(model_name):
12
  model = AutoModelForCausalLM.from_pretrained(model_name)
13
  return model