faizanmumtaz's picture
Upload app.py
b7b04c7
raw
history blame contribute delete
552 Bytes
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)