File size: 519 Bytes
7901fc5
 
3f81b6c
7901fc5
 
 
7886342
7901fc5
54b4917
7901fc5
54b4917
 
 
 
 
 
 
7901fc5
54b4917
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import streamlit as st
import seaborn as sns
# import data_cleaning
from transformers import pipeline


sentiment_model = pipeline(model="ashok2216/gpt2-amazon-sentiment-classifier")

st.markdown(sentiment_model(['It is Super!']))

# sentiments = []
# for text in df['clean_text']:
#     if list(sentiment_model(text)[0].values())[0] == 'LABEL_1':
#         output = 'Positive'
#     else:
#         output = 'Negative'
#     sentiments.append(output)

# df['sentiments'] = sentiments
# sns.countplot(df['sentiments'])