Update app.py
Browse files
app.py
CHANGED
@@ -100,17 +100,13 @@ def main():
|
|
100 |
st.set_page_config(page_title="Review Sentiment Analysis and Improvement Summarisation Report for Business Product", page_icon="🦜")
|
101 |
st.header("Review Sentiment Analysis and Improvement Summarisation Report for Business Product")
|
102 |
try:
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
st.write("Please load a file to continue...")
|
111 |
-
st.text('️️ ')
|
112 |
-
if uploaded_file is not None:
|
113 |
-
uploaded_file.seek(0)
|
114 |
#stage 1:process data
|
115 |
st.text('🔶 Processing Data 🔶')
|
116 |
processed_data = process_data(input_data ,columnname, int(num_data))
|
@@ -136,6 +132,8 @@ def main():
|
|
136 |
summarized_text = summarization(top10_negative_str)
|
137 |
st.write(summarized_text)
|
138 |
st.text('️️🟢 Summarization Finished 🟢')
|
139 |
-
|
|
|
|
|
140 |
if __name__ == "__main__":
|
141 |
main()
|
|
|
100 |
st.set_page_config(page_title="Review Sentiment Analysis and Improvement Summarisation Report for Business Product", page_icon="🦜")
|
101 |
st.header("Review Sentiment Analysis and Improvement Summarisation Report for Business Product")
|
102 |
try:
|
103 |
+
uploaded_file = st.file_uploader("🔶 Upload CSV file for analysis 🔶", type={"csv"})
|
104 |
+
if uploaded_file is not None:
|
105 |
+
columnname = st.text_input("🔶 Please enter the column name in CSV file you want to analyze 🔶")
|
106 |
+
num_data = st.number_input("🔶 Please enter the number of rows you want to process 🔶",step=1)
|
107 |
+
input_data = pd.read_csv(uploaded_file)
|
108 |
+
st.dataframe(input_data)
|
109 |
+
st.text('️️ ')
|
|
|
|
|
|
|
|
|
110 |
#stage 1:process data
|
111 |
st.text('🔶 Processing Data 🔶')
|
112 |
processed_data = process_data(input_data ,columnname, int(num_data))
|
|
|
132 |
summarized_text = summarization(top10_negative_str)
|
133 |
st.write(summarized_text)
|
134 |
st.text('️️🟢 Summarization Finished 🟢')
|
135 |
+
except:
|
136 |
+
st.write("Please load a file to continue...")
|
137 |
+
|
138 |
if __name__ == "__main__":
|
139 |
main()
|