Spaces:
Sleeping
Sleeping
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']) | |