Commit
·
23a184a
1
Parent(s):
535e387
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,18 +34,18 @@ def classify_audio(filepath):
|
|
| 34 |
|
| 35 |
title = "🎵 Music Genre Classifier"
|
| 36 |
description = """
|
| 37 |
-
|
| 38 |
-
classification model that we just trained on the [GTZAN](https://huggingface.co/datasets/marsyas/gtzan)
|
| 39 |
"""
|
| 40 |
|
| 41 |
-
filenames = ['
|
| 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()
|