deeplearningwithpython5240 commited on
Commit
3e5ab07
โ€ข
1 Parent(s): af813d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -99,11 +99,15 @@ def main():
99
  st.set_option('deprecation.showPyplotGlobalUse', False)
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
- uploaded_file = st.file_uploader("๐Ÿ”ถ Upload CSV file for analysis ๐Ÿ”ถ", type={"csv"})
103
- columnname = st.text_input("๐Ÿ”ถ Please enter the column name in CSV file you want to analyze ๐Ÿ”ถ")
104
- num_data = st.number_input("๐Ÿ”ถ Please enter the number of rows you want to process ๐Ÿ”ถ",step=1)
105
- input_data = pd.read_csv(uploaded_file)
106
- st.dataframe(input_data)
 
 
 
 
107
  st.text('๏ธ๏ธ ')
108
  if uploaded_file is not None:
109
  uploaded_file.seek(0)
 
99
  st.set_option('deprecation.showPyplotGlobalUse', False)
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 dataset 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
+ except:
110
+ st.write("Please load a file to continue...")
111
  st.text('๏ธ๏ธ ')
112
  if uploaded_file is not None:
113
  uploaded_file.seek(0)