MatthiasC commited on
Commit
10364d0
1 Parent(s): 32e1bb2

Change caching type for flair tagger

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -43,8 +43,10 @@ def get_spacy():
43
  return nlp
44
 
45
 
46
- # @st.experimental_singleton
47
- @st.cache(suppress_st_warning=True, allow_output_mutation=True)
 
 
48
  def get_flair_tagger():
49
  return SequenceTagger.load("flair/ner-english-ontonotes-fast")
50
 
 
43
  return nlp
44
 
45
 
46
+ #TODO: might look into which one is the best here
47
+ #TODO: might be useful to make an ml6 preloaded model for flair as this takes ridiculously long to load the first time
48
+ @st.experimental_singleton
49
+ #@st.cache(suppress_st_warning=True, allow_output_mutation=True)
50
  def get_flair_tagger():
51
  return SequenceTagger.load("flair/ner-english-ontonotes-fast")
52