shawarmabytes commited on
Commit
7766c93
·
1 Parent(s): 5c53496

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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.write(results[0]['label'])
12
 
13
  if (results[0]['label']=="joy"): #songs for joy emotion
14
  with open('joyplaylist.txt') as f:
@@ -42,7 +42,10 @@ def tester(text):
42
  st.header("stream your emotions")
43
 
44
 
45
- emo = st.text_input("Enter a text/phrase/sentence. A corresponding song will be recommended based on its emotion.")
 
 
 
46
  st.write("Examples: i love you so much")
47
  st.write("I am exhausted.")
48
  st.write("I feel energetic.")
 
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
  if (results[0]['label']=="joy"): #songs for joy emotion
14
  with open('joyplaylist.txt') as f:
 
42
  st.header("stream your emotions")
43
 
44
 
45
+ with st.form(key="form1"):
46
+ emo = st.text_input("Enter a text/phrase/sentence. A corresponding song will be recommended based on its emotion.")
47
+ submit = st.form_submit_burron("Generate Playlist!")
48
+
49
  st.write("Examples: i love you so much")
50
  st.write("I am exhausted.")
51
  st.write("I feel energetic.")