Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -458,9 +458,11 @@ def nlp_pipeline(original_df):
|
|
458 |
|
459 |
|
460 |
|
461 |
-
|
462 |
-
#
|
463 |
-
|
|
|
|
|
464 |
|
465 |
# # # Generate project proposals
|
466 |
# # location_clusters = dict(enumerate(processed_df['Location_Category_Words'].unique()))
|
@@ -489,7 +491,7 @@ def process_excel(file):
|
|
489 |
# Process the DataFrame
|
490 |
console_messages.append("Processing the DataFrame...")
|
491 |
# processed_df, budget_cluster_df, problem_cluster_df, project_proposals, location_clusters, problem_clusters = nlp_pipeline(df)
|
492 |
-
processed_df = nlp_pipeline(df)
|
493 |
|
494 |
output_filename = "OutPut_PPs.xlsx"
|
495 |
with pd.ExcelWriter(output_filename) as writer:
|
@@ -499,7 +501,7 @@ def process_excel(file):
|
|
499 |
# project_proposals_df.reset_index(inplace=True)
|
500 |
# project_proposals_df.to_excel(writer, sheet_name='Project_Proposals', index=False)
|
501 |
|
502 |
-
|
503 |
# problem_cluster_df.to_excel(writer, sheet_name='Problem_Descriptions')
|
504 |
processed_df.to_excel(writer, sheet_name='Input_Processed', index=False)
|
505 |
|
|
|
458 |
|
459 |
|
460 |
|
461 |
+
|
462 |
+
# Create cluster dataframes
|
463 |
+
budget_cluster_df, problem_cluster_df = create_cluster_dataframes(processed_df)
|
464 |
+
|
465 |
+
return processed_df, budget_cluster_df
|
466 |
|
467 |
# # # Generate project proposals
|
468 |
# # location_clusters = dict(enumerate(processed_df['Location_Category_Words'].unique()))
|
|
|
491 |
# Process the DataFrame
|
492 |
console_messages.append("Processing the DataFrame...")
|
493 |
# processed_df, budget_cluster_df, problem_cluster_df, project_proposals, location_clusters, problem_clusters = nlp_pipeline(df)
|
494 |
+
processed_df , budget_cluster_df = nlp_pipeline(df)
|
495 |
|
496 |
output_filename = "OutPut_PPs.xlsx"
|
497 |
with pd.ExcelWriter(output_filename) as writer:
|
|
|
501 |
# project_proposals_df.reset_index(inplace=True)
|
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 |
|