bvallegc commited on
Commit
df2bb17
·
1 Parent(s): 37d1066

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,7 +15,7 @@ def classify_audio(filepath):
15
  {"country": 0.8339303731918335, "rock":0.11914275586605072}
16
  """
17
  preds = pipe(filepath)
18
- classification = [{"label": p["label"],'time':p['time'], "score": p["score"]} for p in preds]
19
  return {"classification": classification}
20
 
21
 
@@ -29,6 +29,6 @@ interface_options = {
29
  }
30
 
31
  demo = gr.Interface(
32
- fn=classify_audio, inputs=gr.Audio(type="filepath"), outputs=[gr.outputs.Label(), gr.Number(label="Prediction time (s)")], **interface_options
33
  )
34
  demo.launch(debug=True)
 
15
  {"country": 0.8339303731918335, "rock":0.11914275586605072}
16
  """
17
  preds = pipe(filepath)
18
+ classification = [{"label": p["label"], "score": p["score"]} for p in preds]
19
  return {"classification": classification}
20
 
21
 
 
29
  }
30
 
31
  demo = gr.Interface(
32
+ fn=classify_audio, inputs=gr.Audio(type="filepath"), outputs=[gr.outputs.Label()], **interface_options
33
  )
34
  demo.launch(debug=True)