Redmind commited on
Commit
311cf7d
·
verified ·
1 Parent(s): b41393c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -1174,9 +1174,18 @@ def handle_large_dataset(df, create_document,isDataFrame):
1174
 
1175
  # Get the current working directory
1176
  current_folder = os.getcwd()
1177
- file_path = os.path.join(current_folder, 'output_data.xlsx')
1178
- df.to_excel(file_path, index=False)
1179
 
 
 
 
 
 
 
 
 
 
 
1180
  print(f"The current folder is: {current_folder}")
1181
  #save_file_to_hostinger('output_data.xlsx')
1182
  # 4. Create a summary and table of the first 10 rows for display
 
1174
 
1175
  # Get the current working directory
1176
  current_folder = os.getcwd()
1177
+
 
1178
 
1179
+ # Define the persistent storage directory
1180
+ persistent_dir = "/persistent"
1181
+
1182
+ # Ensure the directory exists
1183
+ os.makedirs(persistent_dir, exist_ok=True)
1184
+
1185
+ file_path = os.path.join(persistent_dir, 'output_data.xlsx')
1186
+ df.to_excel(file_path, index=False)
1187
+ files = os.listdir(persistent_dir)
1188
+ print(f"Files in persistent storage: {files}")
1189
  print(f"The current folder is: {current_folder}")
1190
  #save_file_to_hostinger('output_data.xlsx')
1191
  # 4. Create a summary and table of the first 10 rows for display