Update handler.py
Browse files- handler.py +1 -3
handler.py
CHANGED
@@ -17,9 +17,7 @@ class EndpointHandler():
|
|
17 |
|
18 |
image = Image.open(BytesIO(base64.b64decode(inputs['image'])))
|
19 |
inputs = self.processor(image, return_tensors="pt").to(device)
|
20 |
-
|
21 |
-
with torch.no_grad():
|
22 |
-
outputs = self.model(**inputs)
|
23 |
|
24 |
return outputs
|
25 |
|
|
|
17 |
|
18 |
image = Image.open(BytesIO(base64.b64decode(inputs['image'])))
|
19 |
inputs = self.processor(image, return_tensors="pt").to(device)
|
20 |
+
outputs = self.model(**inputs)
|
|
|
|
|
21 |
|
22 |
return outputs
|
23 |
|