SantanuBanerjee commited on
Commit
38b2a27
·
verified ·
1 Parent(s): f80d2db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -11
app.py CHANGED
@@ -502,20 +502,27 @@ def process_excel(file):
502
  # project_proposals_df.to_excel(writer, sheet_name='Project_Proposals', index=False)
503
 
504
  budget_cluster_df.to_excel(writer, sheet_name='Financial_Weights')
505
- problem_cluster_df.to_excel(writer, sheet_name='Problem_Descriptions')
506
  processed_df.to_excel(writer, sheet_name='Input_Processed', index=False)
507
-
508
- # Ensure location_clusters and problem_clusters are in DataFrame format
509
- if isinstance(location_clusters, pd.DataFrame):
510
- location_clusters.to_excel(writer, sheet_name='Location_Clusters', index=False)
511
  else:
512
  console_messages.append("Converting Location Clusters to df")
513
- pd.DataFrame(location_clusters).to_excel(writer, sheet_name='Location_Clusters', index=False)
514
- if isinstance(problem_clusters, pd.DataFrame):
515
- problem_clusters.to_excel(writer, sheet_name='Problem_Clusters', index=False)
516
- else:
517
- console_messages.append("Converting Problem Clusters to df")
518
- pd.DataFrame(problem_clusters).to_excel(writer, sheet_name='Problem_Clusters', index=False)
 
 
 
 
 
 
 
 
519
 
520
 
521
 
 
502
  # project_proposals_df.to_excel(writer, sheet_name='Project_Proposals', index=False)
503
 
504
  budget_cluster_df.to_excel(writer, sheet_name='Financial_Weights')
 
505
  processed_df.to_excel(writer, sheet_name='Input_Processed', index=False)
506
+
507
+
508
+ if isinstance(problem_cluster_df, pd.DataFrame):
509
+ problem_cluster_df.to_excel(writer, sheet_name='Problem_Descriptions')
510
  else:
511
  console_messages.append("Converting Location Clusters to df")
512
+ pd.DataFrame(problem_cluster_df).to_excel(writer, sheet_name='Problem_Descriptions', index=False)
513
+
514
+ # # Ensure location_clusters and problem_clusters are in DataFrame format
515
+ # if isinstance(location_clusters, pd.DataFrame):
516
+ # location_clusters.to_excel(writer, sheet_name='Location_Clusters', index=False)
517
+ # else:
518
+ # console_messages.append("Converting Location Clusters to df")
519
+ # pd.DataFrame(location_clusters).to_excel(writer, sheet_name='Location_Clusters', index=False)
520
+
521
+ # if isinstance(problem_clusters, pd.DataFrame):
522
+ # problem_clusters.to_excel(writer, sheet_name='Problem_Clusters', index=False)
523
+ # else:
524
+ # console_messages.append("Converting Problem Clusters to df")
525
+ # pd.DataFrame(problem_clusters).to_excel(writer, sheet_name='Problem_Clusters', index=False)
526
 
527
 
528