Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -9,8 +9,8 @@ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
9 |
|
10 |
class EndpointHandler():
|
11 |
def __init__(self, path=""):
|
12 |
-
self.model = Swinv2Model.from_pretrained("microsoft/
|
13 |
-
self.processor = AutoImageProcessor.from_pretrained("microsoft/
|
14 |
|
15 |
def __call__(self, data: Any) -> List[float]:
|
16 |
inputs = data.pop("inputs", data)
|
|
|
9 |
|
10 |
class EndpointHandler():
|
11 |
def __init__(self, path=""):
|
12 |
+
self.model = Swinv2Model.from_pretrained("microsoft/swinv2-large-patch4-window12to24-192to384-22kto1k-ft").to(device)
|
13 |
+
self.processor = AutoImageProcessor.from_pretrained("microsoft/swinv2-large-patch4-window12to24-192to384-22kto1k-ft")
|
14 |
|
15 |
def __call__(self, data: Any) -> List[float]:
|
16 |
inputs = data.pop("inputs", data)
|