Spaces:
Runtime error
Runtime error
Update app.py
Browse files71 unmodified lines72737475767778798081828384858687883 unmodified lines9293949596979871 unmodified linesdef classify_audio(filepath):start_time = timer()preds = pipe(filepath)# preds = predict_trunc(filepath)outputs = {}pred_time = round(timer() - start_time, 5)for p in preds:outputs[p["label"]] = p["score"], timerreturn outputstitle = "🎵 Music Genre Classifier"description = """Demo for a music genre classifier trained on [GTZAN](https://huggingface.co/datasets/marsyas/gtzan)For more info checkout [GITHUB](https://github.com/AEscF)3 unmodified linesdemo = gr.Interface(fn=classify_audio,inputs=gr.Audio(type="filepath"),outputs=[gr.Label(label="Predictions"), gr.Number(label="Prediction time (s)")],title=title,description=description,examples=filenames,71 unmodified lines727374757677787980818283848586873 unmodified lines9192939495969771 unmodified linesdef classify_audio(filepath):preds = pipe(filepath)# preds = predict_trunc(filepath)outputs = {}for p in preds:outputs[p["label"]] = p["score"]return outputstitle = "Music Genre Classifier"description = """Demo for a music genre classifier trained on [GTZAN](https://huggingface.co/datasets/marsyas/gtzan)For more info checkout [GITHUB](https://github.com/AEscF)3 unmodified linesdemo = gr.Interface(fn=classify_audio,inputs=gr.Audio(type="filepath"),outputs=[gr.Label(label="Predictions")],title=title,description=description,examples=filenames,
app.py+4-5