yashkens commited on
Commit
fa8f5a8
•
1 Parent(s): f6d175c

some fixes

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -5,16 +5,17 @@ from nltk.tokenize import sent_tokenize, word_tokenize
5
  import nltk
6
  nltk.download('punkt')
7
 
8
- st.title("I don't even know what this is yet")
9
 
10
  name = st.text_input('Who are you?', 'Right, who am I?')
11
- text = st.text_area('Submit your stories', '''Words and symbols are meant to be here''')
12
 
13
  if text != 'Words and symbols are meant to be here':
14
  # emotions
15
  emotion_result = get_emotion(text)
16
  st.write(f"🔮 Overall emotion of your story: {emotion_result[0]['label']}")
17
  joy, sad = 0, 0
 
18
  for emo in emotion_result:
19
  if emo['label'] == 'joy':
20
  if emo['score'] > joy:
 
5
  import nltk
6
  nltk.download('punkt')
7
 
8
+ st.title("Strange Story Critique service")
9
 
10
  name = st.text_input('Who are you?', 'Right, who am I?')
11
+ text = st.text_area("Submit your story and I'll tell you my unprofessional opinion", '''Words and symbols are meant to be here''')
12
 
13
  if text != 'Words and symbols are meant to be here':
14
  # emotions
15
  emotion_result = get_emotion(text)
16
  st.write(f"🔮 Overall emotion of your story: {emotion_result[0]['label']}")
17
  joy, sad = 0, 0
18
+ st.write(f"{emotion_result}")
19
  for emo in emotion_result:
20
  if emo['label'] == 'joy':
21
  if emo['score'] > joy: