Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,8 +17,9 @@ def predict(Record, Upload):
|
|
17 |
if Upload: path = Upload
|
18 |
else: path = Record
|
19 |
spec,pred,pred_idx,probs = learn.predict(str(path), with_input=True)
|
20 |
-
|
21 |
-
|
|
|
22 |
|
23 |
|
24 |
title = "Japanese Pitch Accent Pattern Detector"
|
|
|
17 |
if Upload: path = Upload
|
18 |
else: path = Record
|
19 |
spec,pred,pred_idx,probs = learn.predict(str(path), with_input=True)
|
20 |
+
fig,ax = plt.subplots()
|
21 |
+
show_image(spec, ax=ax)
|
22 |
+
return [{labels[i]: float(probs[i]) for i in range(len(labels))}, fig]
|
23 |
|
24 |
|
25 |
title = "Japanese Pitch Accent Pattern Detector"
|