Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -8,9 +8,9 @@ from io import BytesIO
|
|
8 |
import base64
|
9 |
|
10 |
class EndpointHandler:
|
11 |
-
def __init__(self
|
12 |
# Initialize the image segmentation pipeline
|
13 |
-
self.pipeline = AutoModelForImageSegmentation.from_pretrained('
|
14 |
torch.set_float32_matmul_precision(['high', 'highest'][0])
|
15 |
self.image_size = (1024, 1024)
|
16 |
|
|
|
8 |
import base64
|
9 |
|
10 |
class EndpointHandler:
|
11 |
+
def __init__(self):
|
12 |
# Initialize the image segmentation pipeline
|
13 |
+
self.pipeline = AutoModelForImageSegmentation.from_pretrained('.', trust_remote_code=True)
|
14 |
torch.set_float32_matmul_precision(['high', 'highest'][0])
|
15 |
self.image_size = (1024, 1024)
|
16 |
|