Teapack1 commited on
Commit
b370699
1 Parent(s): f370638

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -11,8 +11,12 @@ description = "Gradio demo for finetuned Wav2Vec2 model on a custom dataset to p
11
 
12
 
13
  def classify_audio(audio):
14
- predictions = pipe(audio)
15
- return predictions
 
 
 
 
16
 
17
 
18
  iface = gr.Interface(
 
11
 
12
 
13
  def classify_audio(audio):
14
+ preds = pipe(audio)
15
+ outputs = {}
16
+ for p in preds:
17
+ outputs[p["label"]] = p["score"]
18
+ return outputs
19
+
20
 
21
 
22
  iface = gr.Interface(