apenasissso
commited on
Commit
•
0156247
1
Parent(s):
73c9e39
logs
Browse files- handler.py +3 -0
handler.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
from speechbrain.pretrained import EncoderClassifier
|
2 |
from typing import Dict, List, Any
|
3 |
|
@@ -6,6 +7,7 @@ class EndpointHandler:
|
|
6 |
def __init__(self, path=""):
|
7 |
self.model = EncoderClassifier.from_hparams("speechbrain/lang-id-voxlingua107-ecapa")
|
8 |
print('model loaded')
|
|
|
9 |
|
10 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
11 |
"""
|
@@ -19,6 +21,7 @@ class EndpointHandler:
|
|
19 |
audio_url = data.pop("audio_url", data)
|
20 |
|
21 |
print('audio_url', audio_url)
|
|
|
22 |
|
23 |
# check if date exists and if it is a holiday
|
24 |
# run normal prediction
|
|
|
1 |
+
import logging
|
2 |
from speechbrain.pretrained import EncoderClassifier
|
3 |
from typing import Dict, List, Any
|
4 |
|
|
|
7 |
def __init__(self, path=""):
|
8 |
self.model = EncoderClassifier.from_hparams("speechbrain/lang-id-voxlingua107-ecapa")
|
9 |
print('model loaded')
|
10 |
+
logging.info('model loaded')
|
11 |
|
12 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
13 |
"""
|
|
|
21 |
audio_url = data.pop("audio_url", data)
|
22 |
|
23 |
print('audio_url', audio_url)
|
24 |
+
logging.info(f'audio_url {audio_url}')
|
25 |
|
26 |
# check if date exists and if it is a holiday
|
27 |
# run normal prediction
|