Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,7 @@ def classify_lyrics(lyric):
|
|
10 |
text_search_query = [at.split(chr(32)) for at in search_query.lower().split(chr(10))]
|
11 |
|
12 |
tsq = []
|
|
|
13 |
for t in text_search_query:
|
14 |
for tt in t:
|
15 |
tsq.append(''.join(filter(str.isalpha, tt.lower())))
|
@@ -43,8 +44,12 @@ def classify_lyrics(lyric):
|
|
43 |
|
44 |
demo = gr.Interface(
|
45 |
fn=classify_lyrics,
|
46 |
-
inputs=["
|
47 |
-
outputs=[
|
|
|
|
|
|
|
|
|
48 |
)
|
49 |
|
50 |
if __name__ == "__main__":
|
|
|
10 |
text_search_query = [at.split(chr(32)) for at in search_query.lower().split(chr(10))]
|
11 |
|
12 |
tsq = []
|
13 |
+
|
14 |
for t in text_search_query:
|
15 |
for tt in t:
|
16 |
tsq.append(''.join(filter(str.isalpha, tt.lower())))
|
|
|
44 |
|
45 |
demo = gr.Interface(
|
46 |
fn=classify_lyrics,
|
47 |
+
inputs=[gr.Textbox(label="Enter any lyrics here", value="Nothing Else Matters")],
|
48 |
+
outputs=[gr.Label(label"'Match score"),
|
49 |
+
gr.Textbox(label="Title/Artist"),
|
50 |
+
gr.Textbox(label="Genre (if identified)"],
|
51 |
+
title="Algorithmic Lyrics Classifier",
|
52 |
+
description="Algorithmic match lyrics classification by artist and genre"
|
53 |
)
|
54 |
|
55 |
if __name__ == "__main__":
|