File size: 492 Bytes
cc2d8c4
0d1fa79
4ee09d9
 
 
db73f9e
0d1fa79
db73f9e
cc2d8c4
 
9b15e7d
4ee09d9
cc2d8c4
 
 
 
4ee09d9
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#import necessary libraries 

import streamlit as st
from transformers import pipeline

#give a title to app 
name = st.title ('Check the sentiment of your words/email before sending it outπŸ˜ŽπŸ˜­πŸ˜πŸ˜”β€οΈ')

#buidling a sentiment pipeline

pipe = pipeline('sentiment-analysis', model = 'SamLowe/roberta-base-go_emotions')

#text field for user to input data
text = st.text_area('Enter given text here')

# output formated in json format
if text:
    out = pipe(text)
    st.json(out)