Commit
·
cef0579
1
Parent(s):
e587ca5
Changed print to proper info log message
Browse files- handler.py +2 -1
handler.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
from typing import Dict, List, Any
|
| 2 |
from transformers import AutoProcessor, MusicgenForConditionalGeneration
|
| 3 |
import torch
|
|
|
|
| 4 |
|
| 5 |
class EndpointHandler:
|
| 6 |
def __init__(self, path=""):
|
|
@@ -15,7 +16,7 @@ class EndpointHandler:
|
|
| 15 |
The payload with the text prompt and generation parameters.
|
| 16 |
"""
|
| 17 |
# process input
|
| 18 |
-
|
| 19 |
inputs = data.pop("inputs", data)
|
| 20 |
parameters = data.pop("parameters", None)
|
| 21 |
|
|
|
|
| 1 |
from typing import Dict, List, Any
|
| 2 |
from transformers import AutoProcessor, MusicgenForConditionalGeneration
|
| 3 |
import torch
|
| 4 |
+
import logging
|
| 5 |
|
| 6 |
class EndpointHandler:
|
| 7 |
def __init__(self, path=""):
|
|
|
|
| 16 |
The payload with the text prompt and generation parameters.
|
| 17 |
"""
|
| 18 |
# process input
|
| 19 |
+
logging.info(f"data: {data}")
|
| 20 |
inputs = data.pop("inputs", data)
|
| 21 |
parameters = data.pop("parameters", None)
|
| 22 |
|