Spaces:
Runtime error
Runtime error
Ant
commited on
Commit
•
b68e5c4
1
Parent(s):
6144259
Update app.py
Browse files
app.py
CHANGED
@@ -13,11 +13,13 @@ def classify_audio(filepath):
|
|
13 |
to
|
14 |
{"country": 0.8339303731918335, "rock":0.11914275586605072}
|
15 |
"""
|
|
|
16 |
preds = pipe(filepath)
|
17 |
outputs = {}
|
18 |
for p in preds:
|
19 |
outputs[p["label"]] = p["score"]
|
20 |
-
|
|
|
21 |
|
22 |
import gradio as gr
|
23 |
|
|
|
13 |
to
|
14 |
{"country": 0.8339303731918335, "rock":0.11914275586605072}
|
15 |
"""
|
16 |
+
start_time = timer()
|
17 |
preds = pipe(filepath)
|
18 |
outputs = {}
|
19 |
for p in preds:
|
20 |
outputs[p["label"]] = p["score"]
|
21 |
+
pred_time = round(timer() - start_time, 5)
|
22 |
+
return outputs, pred_time
|
23 |
|
24 |
import gradio as gr
|
25 |
|