Spaces:
Sleeping
Sleeping
File size: 485 Bytes
cc2d8c4 4ee09d9 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 |
#import necessary libraries
import streamlit as st
from transformers import pipeline
#give a title to app
name = st.title ('Check the sentiment of your 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)
|