lingyit1108 commited on
Commit
55966a7
1 Parent(s): 0d403a5

modify product recommendation string

Browse files
Files changed (1) hide show
  1. financial_consultant_persona.py +6 -1
financial_consultant_persona.py CHANGED
@@ -72,7 +72,12 @@ def get_cust_data_dict(cust_name="Wong Ling Yit"):
72
  radar_df = pd.merge(radar_df, temp, on="Product Category", how="inner")
73
  temp = temp.sort_values("Score", ascending=False).reset_index(drop=True)
74
 
75
- top_products = temp[:3]["Recommended Product"].tolist()
 
 
 
 
 
76
 
77
  top_score = temp.iloc[0]["Score"]
78
  score_rating = get_score_rating(top_score)
 
72
  radar_df = pd.merge(radar_df, temp, on="Product Category", how="inner")
73
  temp = temp.sort_values("Score", ascending=False).reset_index(drop=True)
74
 
75
+ top_categories = temp[:3]["Product Category"].tolist()
76
+ top_recom_products = temp[:3]["Recommended Product"].tolist()
77
+ top_products = []
78
+ for c, p in zip(top_categories, top_recom_products):
79
+ product_msg = f"{c}: {p}"
80
+ top_products.append(product_msg)
81
 
82
  top_score = temp.iloc[0]["Score"]
83
  score_rating = get_score_rating(top_score)