File size: 520 Bytes
d66b767
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""Load model_s."""
# pylint: disable=invalid-name

from pathlib import Path
import joblib

# from sentence_transformers import SentenceTransformer
from alive_progress import alive_bar

file_loc = "radiobee/model_s.lzma"
file_loc = "model_s.lzma"
if not Path(file_loc).exists():
    raise Exception(f"File {file_loc} does not exist.")

with alive_bar(1, title="Loading model_s, takes up to ~2 minutes...", length=3) as progress_bar:
    model_s = joblib.load(file_loc)
    progress_bar()  # pylint: disable=not-callable