zesquirrelnator
commited on
Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -6,8 +6,8 @@ import base64
|
|
6 |
|
7 |
# Initialize the model and tokenizer
|
8 |
model_id = "zesquirrelnator/moondream2-finetuneV2"
|
9 |
-
model = AutoModelForCausalLM.from_pretrained(model_id)
|
10 |
-
tokenizer = AutoTokenizer.from_pretrained("vikhyatk/moondream2")
|
11 |
|
12 |
# Check if CUDA (GPU support) is available and then set the device to GPU or CPU
|
13 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
6 |
|
7 |
# Initialize the model and tokenizer
|
8 |
model_id = "zesquirrelnator/moondream2-finetuneV2"
|
9 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
|
10 |
+
tokenizer = AutoTokenizer.from_pretrained("vikhyatk/moondream2", trust_remote_code=True)
|
11 |
|
12 |
# Check if CUDA (GPU support) is available and then set the device to GPU or CPU
|
13 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|