Amitai Getzler
commited on
Commit
•
dc7652d
1
Parent(s):
b76f035
:heavy_plus_sign: Ad
Browse files- __pycache__/handler.cpython-312.pyc +0 -0
- handler.py +1 -1
__pycache__/handler.cpython-312.pyc
CHANGED
Binary files a/__pycache__/handler.cpython-312.pyc and b/__pycache__/handler.cpython-312.pyc differ
|
|
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=
|
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="cuda" if torch.cuda.is_available() else "cpu")
|
14 |
)
|
15 |
self.tokenizer = open_clip.get_tokenizer("hf-hub:Styld/marqo-fashionSigLIP")
|
16 |
|