|
import streamlit as st |
|
import pandas as pd |
|
import seaborn as sns |
|
import matplotlib.pyplot as plt |
|
import plotly.express as px |
|
|
|
|
|
def run(): |
|
|
|
st.title('Are you ok today?') |
|
|
|
|
|
st.subheader('I did analysis for you!') |
|
|
|
|
|
st.markdown('---') |
|
|
|
|
|
df = pd.read_csv('sentiments_filtered.csv') |
|
st.dataframe(df) |
|
|
|
|
|
st.write('#### Plot distribution of sentiments') |
|
fig = plt.figure(figsize=(15, 5)) |
|
sns.countplot(x='sentiment', data=df) |
|
st.pyplot(fig) |
|
|
|
|
|
st.write('#### Histogram Plot') |
|
option = st.selectbox('Choose column: ', ('text', 'sentiment')) |
|
fig = plt.figure(figsize=(15, 5)) |
|
sns.histplot(df[option], bins=30, kde=True) |
|
st.pyplot(fig) |
|
|
|
|
|
if __name__ == '__main__': |
|
run() |
|
|