Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -633,6 +633,15 @@ def analyze_excel_single(file_path):
|
|
| 633 |
if trustbuilder_present:
|
| 634 |
# Create dataframe for trust builder
|
| 635 |
results_df_builder = pd.read_csv(csv_output_path_trustbuilder)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 636 |
|
| 637 |
combined_data = {
|
| 638 |
"Message": results_df_builder["Message"],
|
|
@@ -644,23 +653,11 @@ def analyze_excel_single(file_path):
|
|
| 644 |
"Competence": results_df_builder["Competence"].round(0).astype(int),
|
| 645 |
}
|
| 646 |
|
| 647 |
-
df_builder = pd.DataFrame(combined_data)
|
| 648 |
-
|
| 649 |
-
|
| 650 |
-
# List of bucket columns
|
| 651 |
-
bucket_colors = {
|
| 652 |
-
"Stability": "background-color: lightblue",
|
| 653 |
-
"Development": "background-color: lightgreen",
|
| 654 |
-
"Relationship": "background-color: lavender",
|
| 655 |
-
"Benefit": "background-color: lightyellow",
|
| 656 |
-
"Vision": "background-color: orange",
|
| 657 |
-
"Competence": "background-color: lightcoral",
|
| 658 |
-
}
|
| 659 |
-
|
| 660 |
-
df_builder_style = df_builder.style.applymap(
|
| 661 |
-
lambda _: bucket_colors.get(_, ""), subset=bucket_colors.keys()
|
| 662 |
)
|
| 663 |
-
|
| 664 |
|
| 665 |
|
| 666 |
# Prepare lists to collect data
|
|
|
|
| 633 |
if trustbuilder_present:
|
| 634 |
# Create dataframe for trust builder
|
| 635 |
results_df_builder = pd.read_csv(csv_output_path_trustbuilder)
|
| 636 |
+
bucket_colors = {
|
| 637 |
+
"Stability": "lightblue",
|
| 638 |
+
"Development": "lightgreen",
|
| 639 |
+
"Relationship": "lavender",
|
| 640 |
+
"Benefit": "lightyellow",
|
| 641 |
+
"Vision": "orange",
|
| 642 |
+
"Competence": "lightcoral",
|
| 643 |
+
}
|
| 644 |
+
|
| 645 |
|
| 646 |
combined_data = {
|
| 647 |
"Message": results_df_builder["Message"],
|
|
|
|
| 653 |
"Competence": results_df_builder["Competence"].round(0).astype(int),
|
| 654 |
}
|
| 655 |
|
| 656 |
+
df_builder = pd.DataFrame(combined_data).style.applymap(
|
| 657 |
+
lambda _: f"background-color: {bucket_colors.get(_, '')}",
|
| 658 |
+
subset=list(bucket_colors.keys())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 659 |
)
|
| 660 |
+
|
| 661 |
|
| 662 |
|
| 663 |
# Prepare lists to collect data
|