shawarmabytes commited on
Commit
5d2626c
·
1 Parent(s): f522898

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -8,6 +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
 
12
  if (results[0]['label']=="joy"): #songs for joy emotion
13
  with open('joyplaylist.txt') as f:
@@ -41,7 +42,7 @@ def tester(text):
41
  contents = f.read()
42
  components.html(contents,width=560,height=325)
43
  contents.close()
44
- return results[0]['label']
45
 
46
 
47
 
 
8
  def tester(text):
9
  classifier = pipeline("sentiment-analysis", model='bhadresh-savani/distilbert-base-uncased-emotion')
10
  results = classifier(text)
11
+ st.write(results[0]['label'])
12
 
13
  if (results[0]['label']=="joy"): #songs for joy emotion
14
  with open('joyplaylist.txt') as f:
 
42
  contents = f.read()
43
  components.html(contents,width=560,height=325)
44
  contents.close()
45
+
46
 
47
 
48