presidio commited on
Commit
d67f170
1 Parent(s): db08cce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -20,7 +20,7 @@ from transformers_rec import (
20
 
21
 
22
  # Helper methods
23
- @st.cache
24
  def analyzer_engine(model_path: str):
25
  """Return AnalyzerEngine.
26
 
@@ -67,7 +67,7 @@ def analyzer_engine(model_path: str):
67
  return analyzer
68
 
69
 
70
- @st.cache
71
  def anonymizer_engine():
72
  """Return AnonymizerEngine."""
73
  return AnonymizerEngine()
@@ -79,7 +79,6 @@ def get_supported_entities():
79
  return analyzer_engine(st_model).get_supported_entities()
80
 
81
 
82
- @st.cache
83
  def analyze(**kwargs):
84
  """Analyze input using Analyzer engine and input arguments (kwargs)."""
85
  if "entities" not in kwargs or "All" in kwargs["entities"]:
 
20
 
21
 
22
  # Helper methods
23
+ @st.cache(ignore_hash=True, allow_output_mutation = True)
24
  def analyzer_engine(model_path: str):
25
  """Return AnalyzerEngine.
26
 
 
67
  return analyzer
68
 
69
 
70
+ @st.cache(ignore_hash=True, allow_output_mutation = True)
71
  def anonymizer_engine():
72
  """Return AnonymizerEngine."""
73
  return AnonymizerEngine()
 
79
  return analyzer_engine(st_model).get_supported_entities()
80
 
81
 
 
82
  def analyze(**kwargs):
83
  """Analyze input using Analyzer engine and input arguments (kwargs)."""
84
  if "entities" not in kwargs or "All" in kwargs["entities"]: