Commit
·
9af3ea1
1
Parent(s):
a47fd1a
Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -5,7 +5,7 @@ class EndpointHandler:
|
|
5 |
def __init__(self, model_path="originstory/holisleigh", use_auth_token=None):
|
6 |
# Load model and processor with consistent path
|
7 |
self.processor = AutoProcessor.from_pretrained(model_path, use_auth_token=None)
|
8 |
-
self.model = MusicgenForConditionalGeneration.from_pretrained(
|
9 |
|
10 |
def __call__(self, data: dict) -> dict:
|
11 |
"""
|
|
|
5 |
def __init__(self, model_path="originstory/holisleigh", use_auth_token=None):
|
6 |
# Load model and processor with consistent path
|
7 |
self.processor = AutoProcessor.from_pretrained(model_path, use_auth_token=None)
|
8 |
+
self.model = MusicgenForConditionalGeneration.from_pretrained("originstory/holisleigh", torch_dtype=torch.float16, use_auth_token=use_auth_token).to("cuda")
|
9 |
|
10 |
def __call__(self, data: dict) -> dict:
|
11 |
"""
|