Spaces:
Running
Running
Update load_model.py
Browse files- load_model.py +5 -1
load_model.py
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
import tensorflow as tf
|
|
|
2 |
|
3 |
def load_model_and_preprocessor(model_path, preprocessor_path):
|
4 |
# Load the neural network model
|
5 |
model = tf.keras.models.load_model(model_path)
|
6 |
|
7 |
-
|
|
|
|
|
|
|
|
1 |
import tensorflow as tf
|
2 |
+
import joblib
|
3 |
|
4 |
def load_model_and_preprocessor(model_path, preprocessor_path):
|
5 |
# Load the neural network model
|
6 |
model = tf.keras.models.load_model(model_path)
|
7 |
|
8 |
+
# Load the preprocessor
|
9 |
+
preprocessor = joblib.load(preprocessor_path)
|
10 |
+
|
11 |
+
return model, preprocessor
|