DifeiT commited on
Commit
999925f
1 Parent(s): 3a52d0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -73,7 +73,7 @@ with st.form(key="my_form"):
73
  if ModelType == "Bioformer(Default)":
74
  # kw_model = KeyBERT(model=roberta)
75
 
76
- @st.cache(allow_output_mutation=True)
77
  def load_model(model='hpo'):
78
  if model =='1':
79
  ontfiles = {'dic_file': './dict_new_fyeco/noabb_lemma.dic',
@@ -109,7 +109,7 @@ with st.form(key="my_form"):
109
  nn_model2, biotag_dic2 = load_model(model='2')
110
 
111
  else:
112
- @st.cache(allow_output_mutation=True)
113
  def load_model():
114
  ontfiles={'dic_file':'./dict_new/noabb_lemma.dic',
115
  'word_hpo_file':'./dict_new/word_id_map.json',
 
73
  if ModelType == "Bioformer(Default)":
74
  # kw_model = KeyBERT(model=roberta)
75
 
76
+ @st.cache_resources
77
  def load_model(model='hpo'):
78
  if model =='1':
79
  ontfiles = {'dic_file': './dict_new_fyeco/noabb_lemma.dic',
 
109
  nn_model2, biotag_dic2 = load_model(model='2')
110
 
111
  else:
112
+ @st.cache_resources
113
  def load_model():
114
  ontfiles={'dic_file':'./dict_new/noabb_lemma.dic',
115
  'word_hpo_file':'./dict_new/word_id_map.json',