presidio commited on
Commit
db08cce
1 Parent(s): 6523cbd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -20,7 +20,7 @@ from transformers_rec import (
20
 
21
 
22
  # Helper methods
23
- @st.cache_resource
24
  def analyzer_engine(model_path: str):
25
  """Return AnalyzerEngine.
26
 
@@ -67,19 +67,19 @@ def analyzer_engine(model_path: str):
67
  return analyzer
68
 
69
 
70
- @st.cache_resource
71
  def anonymizer_engine():
72
  """Return AnonymizerEngine."""
73
  return AnonymizerEngine()
74
 
75
 
76
- @st.cache_data
77
  def get_supported_entities():
78
  """Return supported entities from the Analyzer Engine."""
79
  return analyzer_engine(st_model).get_supported_entities()
80
 
81
 
82
- @st.cache_data
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
24
  def analyzer_engine(model_path: str):
25
  """Return AnalyzerEngine.
26
 
 
67
  return analyzer
68
 
69
 
70
+ @st.cache
71
  def anonymizer_engine():
72
  """Return AnonymizerEngine."""
73
  return AnonymizerEngine()
74
 
75
 
76
+ @st.cache
77
  def get_supported_entities():
78
  """Return supported entities from the Analyzer Engine."""
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"]: