apenasissso
commited on
Commit
·
1ca74a2
1
Parent(s):
4fbac8b
inputs
Browse files- handler.py +4 -4
handler.py
CHANGED
@@ -10,13 +10,13 @@ class EndpointHandler:
|
|
10 |
logging.info('model loaded')
|
11 |
|
12 |
def __call__(self, data: Dict[str, Any]) -> Dict[str, Any]:
|
13 |
-
|
14 |
|
15 |
-
print('audio_url',
|
16 |
-
logging.info(f'audio_url {
|
17 |
|
18 |
# check if date exists and if it is a holiday
|
19 |
# run normal prediction
|
20 |
-
output = self.model.classify_file(
|
21 |
return {"prediction": output[1].exp()}
|
22 |
|
|
|
10 |
logging.info('model loaded')
|
11 |
|
12 |
def __call__(self, data: Dict[str, Any]) -> Dict[str, Any]:
|
13 |
+
inputs = data.pop("inputs",data)
|
14 |
|
15 |
+
print('audio_url', inputs)
|
16 |
+
logging.info(f'audio_url {inputs}')
|
17 |
|
18 |
# check if date exists and if it is a holiday
|
19 |
# run normal prediction
|
20 |
+
output = self.model.classify_file(inputs)
|
21 |
return {"prediction": output[1].exp()}
|
22 |
|