Conditions | 4 |
Total Lines | 7 |
Code Lines | 7 |
Lines | 7 |
Ratio | 100 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 0 |
1 | 1 | import os |
|
11 | 1 | def load_model(self, load_path: str): |
|
12 | 1 | loading_prep = lambda string: f'model_dir/{load_path}/{string}' |
|
13 | 1 | self.emb.load(loading_prep('emb.pkl')) |
|
14 | 1 | with open(loading_prep('model.pkl'), 'rb') as f: |
|
15 | 1 | self.clf = pickle.load(f) |
|
16 | 1 | with open(loading_prep('scaler.pkl'), 'rb') as f: |
|
17 | 1 | self.scaler = pickle.load(f) |
|
18 | |||
27 |