Amitai Getzler commited on
Commit
b76f035
1 Parent(s): 02ca591

:heavy_plus_sign: Dad

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -10,7 +10,7 @@ from typing import Dict, Any
10
  class EndpointHandler:
11
  def __init__(self, path="hf-hub:Styld/marqo-fashionSigLIP"):
12
  self.model, self.preprocess_train, self.preprocess_val = (
13
- open_clip.create_model_and_transforms("hf-hub:Styld/marqo-fashionSigLIP", device=torch.device('cuda'))
14
  )
15
  self.tokenizer = open_clip.get_tokenizer("hf-hub:Styld/marqo-fashionSigLIP")
16
 
 
10
  class EndpointHandler:
11
  def __init__(self, path="hf-hub:Styld/marqo-fashionSigLIP"):
12
  self.model, self.preprocess_train, self.preprocess_val = (
13
+ open_clip.create_model_and_transforms("hf-hub:Styld/marqo-fashionSigLIP", device=torch.device('cuda' if torch.cuda.is_available() else 'cpu'))
14
  )
15
  self.tokenizer = open_clip.get_tokenizer("hf-hub:Styld/marqo-fashionSigLIP")
16