Team Ai
Apppublic

mellowFluff/Explicit-Lyrics-Classifier-Project

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
app.py14 linesDownload Raw Back to root
1import joblib2import gradio as gr3 4Model = joblib.load('explicit_lyrics_classifier.sav')5 6def pred_lyrics(input):7  label_mapping = label_mapping = {0: 'non-explicit', 1: 'explicit'}8  input = [input]9  pred = Model.predict(input)10  label_ex = [label_mapping[label] for label in pred]11  return label_ex12 13iface = gr.Interface(fn = pred_lyrics, inputs = "text", outputs = "text", title = "Explicit Lyrics Classifier")14iface.launch(inline = False)