mizoru commited on
Commit
84101d2
1 Parent(s): 8a6918f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- return [{labels[i]: float(probs[i]) for i in range(len(labels))}, show_image(spec)]
 
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"