Vaibhav Srivastav
commited on
Commit
•
c4d0354
1
Parent(s):
f5de0f6
up
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -6,7 +6,7 @@ class EndpointHandler:
|
|
6 |
def __init__(self, path=""):
|
7 |
# load model and processor from path
|
8 |
self.processor = AutoProcessor.from_pretrained("facebook/musicgen-small")
|
9 |
-
self.model = MusicgenForConditionalGeneration.from_pretrained("facebook/musicgen-small")
|
10 |
|
11 |
def __call__(self, data: Dict[str, Any]) -> Dict[str, str]:
|
12 |
"""
|
|
|
6 |
def __init__(self, path=""):
|
7 |
# load model and processor from path
|
8 |
self.processor = AutoProcessor.from_pretrained("facebook/musicgen-small")
|
9 |
+
self.model = MusicgenForConditionalGeneration.from_pretrained("facebook/musicgen-small").to("cuda")
|
10 |
|
11 |
def __call__(self, data: Dict[str, Any]) -> Dict[str, str]:
|
12 |
"""
|