Spaces:
Runtime error
Runtime error
Update app.py
Browse files70 unmodified lines717273747576777879808182839 unmodified lines9394959697989970 unmodified linesdef classify_audio(filepath):"""Goes from[{'score': 0.8339303731918335, 'label': 'country'},{'score': 0.11914275586605072, 'label': 'rock'},]to{"country": 0.8339303731918335, "rock":0.11914275586605072}"""start_time = timer()preds = pipe(filepath)# preds = predict_trunc(filepath)9 unmodified linesDemo for a music genre classifier trained on [GTZAN](https://huggingface.co/datasets/marsyas/gtzan)For more info checkout [GITHUB](https://github.com/AEscF)"""filenames = ['blues.00098.wav', "disco.00020.wav", "classical.00075.wav","keyboard-153960.mp3"]filenames = [[f"./{f}"] for f in filenames]demo = gr.Interface(fn=classify_audio,70 unmodified lines717273747576779 unmodified lines8788899091929370 unmodified linesdef classify_audio(filepath):start_time = timer()preds = pipe(filepath)# preds = predict_trunc(filepath)9 unmodified linesDemo for a music genre classifier trained on [GTZAN](https://huggingface.co/datasets/marsyas/gtzan)For more info checkout [GITHUB](https://github.com/AEscF)"""filenames = ['EN_0049.wav', "FR_0098.wav", "JP_0222.wav",]filenames = [[f"./{f}"] for f in filenames]demo = gr.Interface(fn=classify_audio,
app.py+2-8