zesquirrelnator commited on
Commit
009a755
1 Parent(s): d01870b

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -8,7 +8,7 @@ class EndpointHandler:
8
  def __init__(self, model_dir):
9
  self.model_id = "zesquirrelnator/moondream2-FinetuneV3.1"
10
  self.model = AutoModelForCausalLM.from_pretrained(self.model_id, trust_remote_code=True)
11
- tokenizer = AutoTokenizer.from_pretrained("vikhyatk/moondream2", revision="2024-05-20") # Tokenizer is still from the original repository
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")
 
8
  def __init__(self, model_dir):
9
  self.model_id = "zesquirrelnator/moondream2-FinetuneV3.1"
10
  self.model = AutoModelForCausalLM.from_pretrained(self.model_id, trust_remote_code=True)
11
+ self.tokenizer = AutoTokenizer.from_pretrained("vikhyatk/moondream2", revision="2024-05-20") # Tokenizer is still from the original repository
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")