Spaces:
Sleeping
Sleeping
Vela
commited on
Commit
·
198d7d1
1
Parent(s):
5cb9852
added joblib library
Browse files
models.py
CHANGED
@@ -2,6 +2,7 @@ from sentence_transformers import SentenceTransformer
|
|
2 |
from sklearn.linear_model import LogisticRegression
|
3 |
import pickle
|
4 |
from sklearn.model_selection import train_test_split
|
|
|
5 |
|
6 |
import pandas as pd
|
7 |
|
@@ -29,7 +30,8 @@ def save_model(model, filename):
|
|
29 |
|
30 |
|
31 |
def load_model(filename):
|
32 |
-
|
33 |
-
|
|
|
34 |
print(f"Model loaded from {filename}")
|
35 |
return loaded_model
|
|
|
2 |
from sklearn.linear_model import LogisticRegression
|
3 |
import pickle
|
4 |
from sklearn.model_selection import train_test_split
|
5 |
+
import joblib
|
6 |
|
7 |
import pandas as pd
|
8 |
|
|
|
30 |
|
31 |
|
32 |
def load_model(filename):
|
33 |
+
loaded_model = joblib.load('log_reg_model.pkl')
|
34 |
+
# with open(filename, 'rb') as model_file:
|
35 |
+
# loaded_model = pickle.load(model_file)
|
36 |
print(f"Model loaded from {filename}")
|
37 |
return loaded_model
|