Update model_loading.py
Browse files- model_loading.py +7 -6
model_loading.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
-
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
tokenizer = BertTokenizerFast.from_pretrained(model_name, use_auth_token="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")
|
|
|
1 |
+
import os
|
2 |
+
import tensorflow as tf
|
3 |
+
from dotenv import load_dotenv
|
4 |
|
5 |
+
load_dotenv()
|
6 |
+
model_path = os.getenv('MODEL_PATH')
|
7 |
|
8 |
+
def load_model():
|
9 |
+
return tf.keras.models.load_model(model_path)
|
|