You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app.py
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -316,7 +316,7 @@
316
316
# Add custom spacy recognisers to the Comprehend list, so that local Spacy model can be used to pick up e.g. titles, streetnames, UK postcodes that are sometimes missed by comprehend
label="Custom instructions for LLM-based entity detection",
576
-
placeholder="e.g., 'don't redact anything related to Mark Wilson' or 'redact all company names with the label COMPANY_NAME'",
576
+
placeholder="Specify new labels to redact with a description. E.g. 'Redact information related to Mark Wilson with the label MARK_WILSON' or 'redact all company names with the label COMPANY_NAME'.",
577
577
value="",
578
578
lines=3,
579
579
visible=initial_is_llm_method,
580
580
)
581
581
582
-
# Note: Accordion container removed to avoid block ID mismatches
583
-
# Components are now rendered directly in the walkthrough
584
-
585
-
586
582
## Redaction examples
587
583
in_doc_files=gr.File(
588
584
label="Choose a PDF document or image file (PDF, JPG, PNG)",
label="Custom instructions for LLM-based entity detection",
697
-
placeholder="Positive instructions are more likely to be successful than negative instructions. E.g. 'Redact information related to Mark Wilson with the label MARK_WILSON' or 'redact all company names with the label COMPANY_NAME' create labels you can filter by on the review screen, and are both more likely to be successful than 'Don't redact anything related to Mark Wilson' or 'Don't redact any company names.",
693
+
placeholder="Specify new labels to redact with a description. E.g. 'Redact information related to Mark Wilson with the label MARK_WILSON' or 'redact all company names with the label COMPANY_NAME'.",
698
694
value="",
699
695
lines=3,
700
696
visible=initial_is_llm_method,
@@ -2001,8 +1997,8 @@ def show_info_box_on_click(
2001
1997
0,
2002
1998
"paddle",
2003
1999
CHOSEN_REDACT_ENTITIES,
2004
-
CHOSEN_LLM_ENTITIES,
2005
-
"Redact personal information about Lauren with the label LAUREN. Redact any university names with the label UNIVERSITY.",
2000
+
[],
2001
+
"Redact Lauren's name, email addresses, and phone numbers with the label LAUREN. Redact university names with the label UNIVERSITY.",
# If set and non-empty, overrides CLOUD_LLM_PII_MODEL_CHOICE whenever custom instructions are passed to the LLM (e.g. allow-list style rules). Leave empty to always use CLOUD_LLM_PII_MODEL_CHOICE.
0 commit comments