File size: 552 Bytes
b7b04c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 pandas as pd
from main import _main

st.set_page_config(page_title="Reviews Sentiment Analyzer",page_icon="πŸ“Š")

uploaded_file = st.file_uploader("Choose a CSV file; it must have a column with the name 'reviews'", type=["csv"])

if uploaded_file is not None:

    df = pd.read_csv(uploaded_file)

    st.info("Only 20 rows will be analyzed in reviews column.")

    st.write('Original Data:', df)

    if st.button('Analyze Reviews Sentiment!'):
        
        with st.spinner("Please wait..."):

            _main(df)