Commit
•
5e1343b
1
Parent(s):
214cf2e
Update handler.py
Browse files- handler.py +6 -2
handler.py
CHANGED
@@ -2,6 +2,10 @@ from typing import Dict
|
|
2 |
from pyannote.audio import Pipeline
|
3 |
from transformers.pipelines.audio_utils import ffmpeg_read
|
4 |
import torch
|
|
|
|
|
|
|
|
|
5 |
|
6 |
SAMPLE_RATE = 16000
|
7 |
|
@@ -21,8 +25,8 @@ class EndpointHandler():
|
|
21 |
A :obj:`dict`:. base64 encoded image
|
22 |
"""
|
23 |
# process input
|
24 |
-
|
25 |
-
|
26 |
inputs = data.pop("inputs", data)
|
27 |
parameters = data.pop("parameters", None) # min_speakers=2, max_speakers=5
|
28 |
|
|
|
2 |
from pyannote.audio import Pipeline
|
3 |
from transformers.pipelines.audio_utils import ffmpeg_read
|
4 |
import torch
|
5 |
+
from transformers.utils import logging
|
6 |
+
|
7 |
+
logger = logging.get_logger("MAXWELL")
|
8 |
+
|
9 |
|
10 |
SAMPLE_RATE = 16000
|
11 |
|
|
|
25 |
A :obj:`dict`:. base64 encoded image
|
26 |
"""
|
27 |
# process input
|
28 |
+
logger.warning("MAXWELL")
|
29 |
+
logger.warning(data)
|
30 |
inputs = data.pop("inputs", data)
|
31 |
parameters = data.pop("parameters", None) # min_speakers=2, max_speakers=5
|
32 |
|