Wajahat698 commited on
Commit
e6d8f56
·
verified ·
1 Parent(s): 8bd6542

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -782,6 +782,10 @@ def analyze_excel_single(file_path):
782
  except Exception as e:
783
  logger.error("Error removing temporary directory: %s", e)
784
 
 
 
 
 
785
 
786
  def batch_file_processing(file_paths):
787
  """
@@ -960,6 +964,9 @@ def variable_outputs(file_inputs):
960
 
961
  if isinstance(df_builder_pivot, pd.DataFrame):
962
  logger.debug(f"df_builder_pivot: {df_builder_pivot}")
 
 
 
963
 
964
  markdown_5 = gr.Markdown(
965
  "<span style='font-size:20px; font-weight:bold;'> 4) TrustBuilders® </span>",
@@ -978,9 +985,7 @@ def variable_outputs(file_inputs):
978
  value=df_builder_pivot,
979
  headers=list(df_builder_pivot.columns),
980
  interactive=False,
981
- #label=f"{dataset_name}",
982
- label=f"<span style='background-color:yellow;'>stability trust</span>", # Highlight text "stability trust" in yellow
983
-
984
  visible=True,
985
  height=800,
986
  wrap=True,
 
782
  except Exception as e:
783
  logger.error("Error removing temporary directory: %s", e)
784
 
785
+ def highlight_trust_bucket(row):
786
+ if "stability of trust buckets" in row["Trust Bucket®"]:
787
+ return ['background-color: yellow'] * len(row) # Apply yellow background to the entire row
788
+ return [''] * len(row)
789
 
790
  def batch_file_processing(file_paths):
791
  """
 
964
 
965
  if isinstance(df_builder_pivot, pd.DataFrame):
966
  logger.debug(f"df_builder_pivot: {df_builder_pivot}")
967
+ df_builder_pivot["Trust Bucket®"] = df_builder_pivot["Trust Bucket®"].apply(
968
+ lambda x: f"<span style='background-color:yellow;'>{x}</span>" if "stability" in x.lower() else x
969
+ )
970
 
971
  markdown_5 = gr.Markdown(
972
  "<span style='font-size:20px; font-weight:bold;'> 4) TrustBuilders® </span>",
 
985
  value=df_builder_pivot,
986
  headers=list(df_builder_pivot.columns),
987
  interactive=False,
988
+ label=f"{dataset_name}",
 
 
989
  visible=True,
990
  height=800,
991
  wrap=True,