ardneebwar commited on
Commit
23a184a
β€’
1 Parent(s): 535e387

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -34,18 +34,18 @@ def classify_audio(filepath):
34
 
35
  title = "🎡 Music Genre Classifier"
36
  description = """
37
- demo to showcase the music
38
- classification model that we just trained on the [GTZAN](https://huggingface.co/datasets/marsyas/gtzan)
39
  """
40
 
41
- filenames = ['blues.00098.wav', "disco.00020.wav", "metal.00014.wav", "reggae.00021.wav", "rock.00058.wav"]
42
  filenames = [[f"./{f}"] for f in filenames]
43
  demo = gr.Interface(
44
  fn=classify_audio,
45
  inputs=gr.Audio(type="filepath"),
46
- outputs=gr.outputs.Label(),
47
  title=title,
48
  description=description,
49
  examples=filenames,
50
  )
 
51
  demo.launch()
 
34
 
35
  title = "🎡 Music Genre Classifier"
36
  description = """
37
+ Music Genre Classifier model (Fine-tuned "ntu-spml/distilhubert") Dataset: [GTZAN](https://huggingface.co/datasets/marsyas/gtzan)
 
38
  """
39
 
40
+ filenames = ['rock-it-21275.mp3']
41
  filenames = [[f"./{f}"] for f in filenames]
42
  demo = gr.Interface(
43
  fn=classify_audio,
44
  inputs=gr.Audio(type="filepath"),
45
+ outputs=[gr.outputs.Label(), gr.Number(label="Prediction time (s)")],
46
  title=title,
47
  description=description,
48
  examples=filenames,
49
  )
50
+
51
  demo.launch()