ladapetrushenko's picture
Update construction_prediction/constants.py
3437ef6
raw
history blame contribute delete
443 Bytes
import streamlit as st
from pymorphy2 import MorphAnalyzer
from gensim.models import KeyedVectors
@st.cache_resource(show_spinner="Loading the collocation search model")
def load_w2v(model_path):
_w2v_model = KeyedVectors.load_word2vec_format(model_path, binary=True)
return _w2v_model
@st.cache_resource(show_spinner="Loading the morphological analyzer")
def load_morph():
_morph = MorphAnalyzer(lang='ru')
return _morph