Ezhil commited on
Commit
5b9c9a7
·
1 Parent(s): 45d24c7

commit- changes in README file

Browse files
Files changed (1) hide show
  1. main.py +5 -3
main.py CHANGED
@@ -6,7 +6,7 @@ from utils.file_handler import validate_file
6
  from models.sentiment_model import load_model
7
 
8
  # Constants
9
- MAX_FILE_SIZE_MB = 500
10
 
11
  # Load sentiment analysis pipeline
12
  sentiment_pipeline = load_model()
@@ -50,6 +50,8 @@ if uploaded_file is not None:
50
  st.plotly_chart(fig)
51
 
52
  # Allow CSV download
53
- st.download_button("Download Results", df.to_csv(index=False), "sentiment_results.csv", "text/csv")
 
 
54
  else:
55
- st.error("File exceeds the maximum allowed size of 500MB. Please upload a smaller file.")
 
6
  from models.sentiment_model import load_model
7
 
8
  # Constants
9
+ MAX_FILE_SIZE_MB = 200
10
 
11
  # Load sentiment analysis pipeline
12
  sentiment_pipeline = load_model()
 
50
  st.plotly_chart(fig)
51
 
52
  # Allow CSV download
53
+ # st.download_button("Download Results", df.to_csv(index=False), "sentiment_results.csv", "text/csv")
54
+ # Download option
55
+ st.download_button("Download Results", df.to_csv(index=False).encode('utf-8'), "sentiment_results.csv", "text/csv")
56
  else:
57
+ st.error("File exceeds the maximum allowed size of 200MB. Please upload a smaller file.")