zesquirrelnator commited on
Commit
ffc3ebd
·
verified ·
1 Parent(s): 18c2328

Update handler.py

Browse files
Files changed (1) hide show
  1. 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, ignore_mismatched_sizes=True)
11
- self.tokenizer = AutoTokenizer.from_pretrained("vikhyatk/moondream2", trust_remote_code=True, revision="2024-05-08")
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")