arogeriogel commited on
Commit
a29556a
1 Parent(s): 05ffc54

including metadata

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -136,6 +136,9 @@ def analyze_text():
136
  # )
137
  # return analyze_results_extended
138
 
 
 
 
139
  def exclude_manual_input(analyze_results):
140
  analyze_results_fltered=[]
141
  logging.info(
@@ -183,8 +186,8 @@ def anonymise_text():
183
  def clear_results():
184
  st.session_state.anon_results=""
185
  st.session_state.analyze_results=""
186
- if not st.session_state.excluded_words:
187
- analyzer_engine().registry.remove_recognizer("Excluded words recognizer")
188
 
189
  #######################################
190
  #### Initialize "global" variables ####
 
136
  # )
137
  # return analyze_results_extended
138
 
139
+
140
+ ## We might be able to create a new result from json https://github.com/microsoft/presidio/blob/07b854dd7ae247b916aef4d2adbb82f33bba7be8/presidio-analyzer/presidio_analyzer/recognizer_result.py#L72
141
+
142
  def exclude_manual_input(analyze_results):
143
  analyze_results_fltered=[]
144
  logging.info(
 
186
  def clear_results():
187
  st.session_state.anon_results=""
188
  st.session_state.analyze_results=""
189
+ # if not st.session_state.excluded_words:
190
+ analyzer_engine().registry.remove_recognizer("Excluded words recognizer")
191
 
192
  #######################################
193
  #### Initialize "global" variables ####