Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,15 +11,6 @@ def classify_audio(filepath):
|
|
11 |
outputs = {}
|
12 |
for p in preds:
|
13 |
label = p["label"].replace('_', ' ')
|
14 |
-
# Simplify the labels as required
|
15 |
-
if "artifact" in label:
|
16 |
-
label = "artifact"
|
17 |
-
elif "murmur" in label:
|
18 |
-
label = "murmur"
|
19 |
-
elif "extra" in label:
|
20 |
-
label = "normal"
|
21 |
-
elif "normal" in label:
|
22 |
-
label = "normal"
|
23 |
outputs[label] = p["score"]
|
24 |
return outputs
|
25 |
|
|
|
11 |
outputs = {}
|
12 |
for p in preds:
|
13 |
label = p["label"].replace('_', ' ')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
outputs[label] = p["score"]
|
15 |
return outputs
|
16 |
|