rushankg commited on
Commit
7ec3808
·
verified ·
1 Parent(s): 3946047

Update memes.py

Browse files
Files changed (1) hide show
  1. memes.py +6 -2
memes.py CHANGED
@@ -26,11 +26,15 @@ TEMPLATE_IDS = {
26
 
27
  @st.cache_resource
28
  def load_gemma():
29
- tokenizer = AutoTokenizer.from_pretrained("google/gemma-3-27b-it")
 
 
 
30
  model = AutoModelForCausalLM.from_pretrained(
31
  "google/gemma-3-27b-it",
32
  torch_dtype=torch.float16,
33
- device_map="auto"
 
34
  )
35
  return tokenizer, model
36
 
 
26
 
27
  @st.cache_resource
28
  def load_gemma():
29
+ tokenizer = AutoTokenizer.from_pretrained(
30
+ "google/gemma-3-27b-it",
31
+ use_auth_token=st.secrets["HUGGINGFACE_TOKEN"]
32
+ )
33
  model = AutoModelForCausalLM.from_pretrained(
34
  "google/gemma-3-27b-it",
35
  torch_dtype=torch.float16,
36
+ device_map="auto",
37
+ use_auth_token=st.secrets["HUGGINGFACE_TOKEN"]
38
  )
39
  return tokenizer, model
40