Commit
·
880d01b
1
Parent(s):
79b6e07
Added custom runtime logging
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from typing import Dict, List, Any, Literal
|
2 |
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
|
3 |
import torch
|
4 |
-
|
5 |
|
6 |
class EndpointHandler():
|
7 |
def __init__(self, path=""):
|
@@ -36,7 +36,7 @@ class EndpointHandler():
|
|
36 |
"""
|
37 |
# get inputs
|
38 |
inputs = data.pop("inputs", data)
|
39 |
-
|
40 |
parameters = WhisperKwargsHandler(data.get("parameters", {})) # Changed from pop to get
|
41 |
|
42 |
|
|
|
1 |
from typing import Dict, List, Any, Literal
|
2 |
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
|
3 |
import torch
|
4 |
+
import logging
|
5 |
|
6 |
class EndpointHandler():
|
7 |
def __init__(self, path=""):
|
|
|
36 |
"""
|
37 |
# get inputs
|
38 |
inputs = data.pop("inputs", data)
|
39 |
+
logging.info(data.get("parameters"))
|
40 |
parameters = WhisperKwargsHandler(data.get("parameters", {})) # Changed from pop to get
|
41 |
|
42 |
|