Skip to content

Commit

Permalink
add fix protected mode on RM
Browse files Browse the repository at this point in the history
  • Loading branch information
dayesouza committed Apr 17, 2024
1 parent 68b2bf0 commit 3835057
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/workflows/record_matching/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ def att_ui(i):
prefix = prefix + response + '\n'

result = prefix.replace('```\n', '').strip()

if sv_home.protected_mode.value:
unique_names = sv.matching_matches_df.value['Entity name'].unique()
for i, name in enumerate(unique_names, start=1):
result = result.replace(name, 'Entity_{}'.format(i))

sv.matching_evaluations.value = pl.read_csv(io.StringIO(result), read_csv_options={"truncate_ragged_lines": True})

validation, messages_to_llm = util.ui_components.validate_ai_report(messages, sv.matching_evaluations.value)
Expand Down

0 comments on commit 3835057

Please sign in to comment.