File size: 303 Bytes
f893e57
 
 
 
d93543e
f893e57
60bf263
 
f893e57
60bf263
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from transformers import pipeline
import streamlit as st  #Web App

#title
st.title("Text Sentiment Analysis")

text = st.text_input('Input text:', 'I love CS482 course!')

sentiment_pipeline = pipeline("sentiment-analysis")
data = [text]

if st.button('Submit'):
    st.write(sentiment_pipeline(data))