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