File size: 824 Bytes
127c3c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import streamlit as st
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import plotly.express as px


def run():
    # title
    st.title('Are you ok today?')

    # sub header
    st.subheader('I did analysis for you!')

    # lines
    st.markdown('---')

    # show dataframe
    df = pd.read_csv('sentiments_filtered.csv')
    st.dataframe(df)

    # figure plot
    st.write('#### Plot distribution of sentiments')
    fig = plt.figure(figsize=(15, 5))
    sns.countplot(x='sentiment', data=df)
    st.pyplot(fig)

    # histogram of word cloud
    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()