shahbaasu commited on
Commit
7514ada
·
1 Parent(s): 2afc0b9

Added Streamlit config file for better mobile compatibility

Browse files
Files changed (3) hide show
  1. .gitignore +0 -1
  2. .streamlit/config.toml +8 -0
  3. app.py +18 -18
.gitignore CHANGED
@@ -14,7 +14,6 @@ build/
14
  *.whl
15
 
16
  # Streamlit-specific ignores
17
- .streamlit/
18
  streamlit-geh.log
19
 
20
  # Jupyter Notebook ignores
 
14
  *.whl
15
 
16
  # Streamlit-specific ignores
 
17
  streamlit-geh.log
18
 
19
  # Jupyter Notebook ignores
.streamlit/config.toml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ [server]
2
+ headless = true
3
+ enableCORS = false
4
+ enableXsrfProtection = false
5
+ maxUploadSize = 200
6
+
7
+ [browser]
8
+ gatherUsageStats = false
app.py CHANGED
@@ -125,21 +125,21 @@ if uploaded_files is not None:
125
 
126
 
127
  # Save results to Excel
128
- if results:
129
- timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
130
- excel_path = os.path.join(UPLOAD_FOLDER, f"analysis_results_{timestamp}.xlsx")
131
- try:
132
- df = pd.DataFrame(results)
133
- df.to_excel(excel_path, index=False)
134
- st.success(f"Analysis results saved to {excel_path}")
135
- # Provide download link
136
- with open(excel_path, 'rb') as f:
137
- st.download_button(
138
- label="Download Analysis Results",
139
- data=f,
140
- file_name=f"analysis_results_{timestamp}.xlsx",
141
- mime="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
142
- )
143
- except Exception as e:
144
- logger.error(f"Error saving results to Excel: {e}")
145
- st.error(f"Error saving results to Excel: {str(e)}")
 
125
 
126
 
127
  # Save results to Excel
128
+ # if results:
129
+ # timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
130
+ # excel_path = os.path.join(UPLOAD_FOLDER, f"analysis_results_{timestamp}.xlsx")
131
+ # try:
132
+ # df = pd.DataFrame(results)
133
+ # df.to_excel(excel_path, index=False)
134
+ # st.success(f"Analysis results saved to {excel_path}")
135
+ # # Provide download link
136
+ # with open(excel_path, 'rb') as f:
137
+ # st.download_button(
138
+ # label="Download Analysis Results",
139
+ # data=f,
140
+ # file_name=f"analysis_results_{timestamp}.xlsx",
141
+ # mime="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
142
+ # )
143
+ # except Exception as e:
144
+ # logger.error(f"Error saving results to Excel: {e}")
145
+ # st.error(f"Error saving results to Excel: {str(e)}")