tomaszki commited on
Commit
0f406af
·
1 Parent(s): 4920661

Added HF token for downloading Llama model

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -9,7 +9,11 @@ device = 'cuda' if torch.cuda.is_available() else 'cpu'
9
 
10
  @st.cache_resource
11
  def load_model():
12
- return AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16).to(device)
 
 
 
 
13
 
14
  @st.cache_resource
15
  def load_tokenizer():
 
9
 
10
  @st.cache_resource
11
  def load_model():
12
+ return AutoModelForCausalLM.from_pretrained(
13
+ model_name,
14
+ torch_dtype=torch.bfloat16,
15
+ token=st.secrets['hf_token']
16
+ ).to(device)
17
 
18
  @st.cache_resource
19
  def load_tokenizer():