HMPhuoc commited on
Commit
17ae5cb
1 Parent(s): d36a83c

change file path

Browse files
app.py CHANGED
@@ -13,17 +13,17 @@ import plotly.express as px
13
  from underthesea import word_tokenize
14
 
15
  #Load tokenizer
16
- #fp = Path(__file__).with_name('tokenizer.pkl')
17
- with open('train/tokenizer/tokenizer.pkl',mode="rb") as f:
18
  tokenizer = pickle.load(f)
19
 
20
  #Load LSTM
21
- #fp = Path(__file__).with_name('lstm_model.h5')
22
- LSTM_model = tf.keras.models.load_model('train/model/lstm_model.h5', compile=True)
23
 
24
  #Load GRU
25
- #fp = Path(__file__).with_name('gru_model.h5')
26
- GRU_model = load_model('train/model/gru_model.h5')
27
 
28
 
29
  def tokenizer_pad(tokenizer,comment_text,max_length=200):
 
13
  from underthesea import word_tokenize
14
 
15
  #Load tokenizer
16
+ fp = Path(__file__).with_name('tokenizer.pkl')
17
+ with open('fp',mode="rb") as f:
18
  tokenizer = pickle.load(f)
19
 
20
  #Load LSTM
21
+ fp = Path(__file__).with_name('lstm_model.h5')
22
+ LSTM_model = tf.keras.models.load_model(fp)
23
 
24
  #Load GRU
25
+ fp = Path(__file__).with_name('gru_model.h5')
26
+ GRU_model = load_model(fp)
27
 
28
 
29
  def tokenizer_pad(tokenizer,comment_text,max_length=200):
train/model/gru_model.h5 → gru_model.h5 RENAMED
File without changes
train/model/lstm_model.h5 → lstm_model.h5 RENAMED
File without changes
train/tokenizer/tokenizer.pkl → tokenizer.pkl RENAMED
File without changes