Update memes.py
Browse files
memes.py
CHANGED
|
@@ -26,11 +26,15 @@ TEMPLATE_IDS = {
|
|
| 26 |
|
| 27 |
@st.cache_resource
|
| 28 |
def load_gemma():
|
| 29 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
|
|
|
|
|
|
|
|
|
| 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 |
|