apenasissso
commited on
Commit
•
73c9e39
1
Parent(s):
fa05e9e
prints
Browse files- handler.py +3 -0
handler.py
CHANGED
@@ -5,6 +5,7 @@ from typing import Dict, List, Any
|
|
5 |
class EndpointHandler:
|
6 |
def __init__(self, path=""):
|
7 |
self.model = EncoderClassifier.from_hparams("speechbrain/lang-id-voxlingua107-ecapa")
|
|
|
8 |
|
9 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
10 |
"""
|
@@ -17,6 +18,8 @@ class EndpointHandler:
|
|
17 |
# get inputs
|
18 |
audio_url = data.pop("audio_url", data)
|
19 |
|
|
|
|
|
20 |
# check if date exists and if it is a holiday
|
21 |
# run normal prediction
|
22 |
output = self.model.classify_file(audio_url)
|
|
|
5 |
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 |
"""
|
|
|
18 |
# get inputs
|
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
|
25 |
output = self.model.classify_file(audio_url)
|