shawarmabytes commited on
Commit
1cd7ed4
1 Parent(s): d7857b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -8,7 +8,7 @@ import random
8
  def tester(text):
9
  classifier = pipeline("sentiment-analysis", model='bhadresh-savani/distilbert-base-uncased-emotion')
10
  results = classifier(text)
11
- st.subheader(results[0]['label'])
12
 
13
  #tester(emo)
14
 
@@ -20,11 +20,17 @@ with st.form(key="form1"):
20
  tester(emo)
21
 
22
 
23
- def finder(ome):
 
24
 
 
 
 
 
 
25
 
26
 
27
- finder(tester(emo))
28
 
29
 
30
 
 
8
  def tester(text):
9
  classifier = pipeline("sentiment-analysis", model='bhadresh-savani/distilbert-base-uncased-emotion')
10
  results = classifier(text)
11
+ #st.subheader(results[0]['label'])
12
 
13
  #tester(emo)
14
 
 
20
  tester(emo)
21
 
22
 
23
+ #def finder(ome):
24
+ generator = st.button("Generate Song!")
25
 
26
+ if (generator == True):
27
+ elif (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))
34
 
35
 
36