rushankg commited on
Commit
bc0ca96
·
verified ·
1 Parent(s): afe469e

Update memes.py

Browse files
Files changed (1) hide show
  1. memes.py +4 -2
memes.py CHANGED
@@ -31,13 +31,15 @@ def load_llama3():
31
  """
32
  tokenizer = AutoTokenizer.from_pretrained(
33
  "meta-llama/Llama-3.2-1B",
34
- trust_remote_code=True
 
35
  )
36
  model = AutoModelForCausalLM.from_pretrained(
37
  "meta-llama/Llama-3.2-1B",
38
  device_map="auto",
39
  torch_dtype=torch.float16,
40
- trust_remote_code=True
 
41
  )
42
  return tokenizer, model
43
 
 
31
  """
32
  tokenizer = AutoTokenizer.from_pretrained(
33
  "meta-llama/Llama-3.2-1B",
34
+ trust_remote_code=True,
35
+ use_auth_token=st.secrets["HUGGINGFACE_TOKEN"]
36
  )
37
  model = AutoModelForCausalLM.from_pretrained(
38
  "meta-llama/Llama-3.2-1B",
39
  device_map="auto",
40
  torch_dtype=torch.float16,
41
+ trust_remote_code=True,
42
+ use_auth_token=st.secrets["HUGGINGFACE_TOKEN"]
43
  )
44
  return tokenizer, model
45