fruitpicker01 commited on
Commit
1360ec6
·
verified ·
1 Parent(s): b20a254

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -607,6 +607,8 @@ def generate_personalized_sms_wrapper(selected_product, description, product_nam
607
  checks_1 = perform_checks(cut_sms_1, key_message, exceptions_dict)
608
  checks_formatted_1 = format_checks(checks_1)
609
 
 
 
610
  yield(sms_1, "", final_prompt_1, "", checks_formatted_1, "")
611
 
612
  sms_2 = generate_sms_with_timer(final_prompt_2, product_name, key_message)
@@ -1176,6 +1178,7 @@ def extract_failed_checks(checks_dict, exceptions_dict, context=""):
1176
  if match:
1177
  rep_w = match.group(1)
1178
  l, _ = lemmatize_word(rep_w, morph)
 
1179
  exceptions_dict.setdefault("word_repetitions", set()).add(l)
1180
 
1181
  elif result is False:
 
607
  checks_1 = perform_checks(cut_sms_1, key_message, exceptions_dict)
608
  checks_formatted_1 = format_checks(checks_1)
609
 
610
+ print("[DEBUG] exceptions_dict['word_repetitions'] =", exceptions_dict.get("word_repetitions"))
611
+
612
  yield(sms_1, "", final_prompt_1, "", checks_formatted_1, "")
613
 
614
  sms_2 = generate_sms_with_timer(final_prompt_2, product_name, key_message)
 
1178
  if match:
1179
  rep_w = match.group(1)
1180
  l, _ = lemmatize_word(rep_w, morph)
1181
+ print(f"[DEBUG] Adding word repetition exception: rep_w={rep_w}, lemma={l}")
1182
  exceptions_dict.setdefault("word_repetitions", set()).add(l)
1183
 
1184
  elif result is False: