abhiii commited on
Commit
ba21b98
·
verified ·
1 Parent(s): 639b844

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -93,11 +93,10 @@ st.divider()
93
  analyzer_results = analyzer.analyze(text=input_text, entities = supported_entities, language="en",return_decision_process=True,)
94
  # Text Anonymizer
95
  engine = AnonymizerEngine()
96
- result = engine.anonymize(text=text_fr, analyzer_results=analyzer_results)
97
 
98
  # Restructuring anonymizer results
99
  anonymization_results = {"anonymized": result.text,"found": [entity.to_dict() for entity in analyzer_results]}
100
- words = [{'word': text_fr[obj['start']:obj['end']], 'entity_type':obj['entity_type'], 'start':obj['start'], 'end':obj['end']} for obj in anonymization_results['found']]
101
  anonym = anonymization_results['anonymized']
102
 
103
  doc = nlp(input_text)
 
93
  analyzer_results = analyzer.analyze(text=input_text, entities = supported_entities, language="en",return_decision_process=True,)
94
  # Text Anonymizer
95
  engine = AnonymizerEngine()
96
+ result = engine.anonymize(text=input_text, analyzer_results=analyzer_results)
97
 
98
  # Restructuring anonymizer results
99
  anonymization_results = {"anonymized": result.text,"found": [entity.to_dict() for entity in analyzer_results]}
 
100
  anonym = anonymization_results['anonymized']
101
 
102
  doc = nlp(input_text)