Update app.py
Browse files
app.py
CHANGED
@@ -16,12 +16,12 @@ with open('train/tokenizer/tokenizer.pkl',mode="rb") as f:
|
|
16 |
tokenizer = pickle.load(f)
|
17 |
|
18 |
#Load LSTM
|
19 |
-
fp = Path(__file__).with_name('lstm_model.h5')
|
20 |
-
LSTM_model = tf.keras.models.load_model(
|
21 |
|
22 |
#Load GRU
|
23 |
-
fp = Path(__file__).with_name('gru_model.h5')
|
24 |
-
GRU_model = load_model(
|
25 |
|
26 |
|
27 |
def tokenizer_pad(tokenizer,comment_text,max_length=200):
|
|
|
16 |
tokenizer = pickle.load(f)
|
17 |
|
18 |
#Load LSTM
|
19 |
+
#fp = Path(__file__).with_name('lstm_model.h5')
|
20 |
+
LSTM_model = tf.keras.models.load_model('train/model/lstm_model.h5', compile=True)
|
21 |
|
22 |
#Load GRU
|
23 |
+
#fp = Path(__file__).with_name('gru_model.h5')
|
24 |
+
GRU_model = load_model('train/model/gru_model.h5')
|
25 |
|
26 |
|
27 |
def tokenizer_pad(tokenizer,comment_text,max_length=200):
|