Update app.py
Browse files
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.
|
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.
|
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_resource
|
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_resource
|
113 |
def load_model():
|
114 |
ontfiles={'dic_file':'./dict_new/noabb_lemma.dic',
|
115 |
'word_hpo_file':'./dict_new/word_id_map.json',
|