Spaces:
Runtime error
Runtime error
Commit
·
f92543a
1
Parent(s):
543c26b
Update app.py
Browse files
app.py
CHANGED
@@ -11,23 +11,25 @@ def tester(text):
|
|
11 |
#st.subheader(results[0]['label'])
|
12 |
|
13 |
#tester(emo)
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
|
16 |
with st.form(key="form1"):
|
17 |
emo = st.text_input("Enter a text/phrase/sentence. A corresponding song will be recommended based on its emotion.", placeholder="tester po")
|
18 |
-
submit = st.form_submit_button("Generate Playlist!")
|
19 |
|
20 |
tester(emo)
|
21 |
|
22 |
|
23 |
#def finder(ome):
|
24 |
-
|
25 |
|
26 |
-
|
27 |
-
if (results[0]['label']=="anger"): #songs for anger emotion
|
28 |
-
with open('angryplaylist.txt') as f:
|
29 |
-
contents = f.read()
|
30 |
-
components.html(contents,width=560,height=325)
|
31 |
|
32 |
|
33 |
#finder(tester(emo))
|
|
|
11 |
#st.subheader(results[0]['label'])
|
12 |
|
13 |
#tester(emo)
|
14 |
+
generator = st.button("Generate Song!")
|
15 |
+
if (generator == True):
|
16 |
+
if (results[0]['label']=="anger"): #songs for anger emotion
|
17 |
+
with open('angryplaylist.txt') as f:
|
18 |
+
contents = f.read()
|
19 |
+
components.html(contents,width=560,height=325)
|
20 |
|
21 |
|
22 |
with st.form(key="form1"):
|
23 |
emo = st.text_input("Enter a text/phrase/sentence. A corresponding song will be recommended based on its emotion.", placeholder="tester po")
|
24 |
+
#submit = st.form_submit_button("Generate Playlist!")
|
25 |
|
26 |
tester(emo)
|
27 |
|
28 |
|
29 |
#def finder(ome):
|
30 |
+
|
31 |
|
32 |
+
|
|
|
|
|
|
|
|
|
33 |
|
34 |
|
35 |
#finder(tester(emo))
|