brendabor commited on
Commit
2300888
1 Parent(s): 505c76b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -15,6 +15,9 @@ with open('tokenizer.pkl', 'rb') as tokenizer_file:
15
  class_mapping = {"Happy": 0, "Sad": 1, "Calm": 2, "Anger": 3}
16
  numerical_to_label = {v: k for k, v in class_mapping.items()}
17
 
 
 
 
18
  user_input = st.text_input('Enter a Text:')
19
 
20
  # Define prediction variable outside the if block
@@ -36,3 +39,4 @@ if prediction is not None:
36
  threshold = 0.5 # You should define the threshold value
37
  if probability > threshold:
38
  st.write(f'{label}')
 
 
15
  class_mapping = {"Happy": 0, "Sad": 1, "Calm": 2, "Anger": 3}
16
  numerical_to_label = {v: k for k, v in class_mapping.items()}
17
 
18
+ # Add title to the Streamlit app
19
+ st.title('Emotion Detection from Song Lyrics')
20
+
21
  user_input = st.text_input('Enter a Text:')
22
 
23
  # Define prediction variable outside the if block
 
39
  threshold = 0.5 # You should define the threshold value
40
  if probability > threshold:
41
  st.write(f'{label}')
42
+