Abhinand2001 commited on
Commit
c67d4f6
·
1 Parent(s): 92779b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -79,8 +79,7 @@ elif task == "Sentiment Classification":
79
 
80
 
81
  elif input_text2 == "RNN":
82
- with open("spam_model.pkl", 'rb') as model_file:
83
- rnn_model=pickle.load(model_file)
84
  with open("spam_tokeniser.pkl", 'rb') as model_file:
85
  rnn_tokeniser=pickle.load(model_file)
86
 
@@ -125,8 +124,7 @@ elif task == "Sentiment Classification":
125
 
126
 
127
  elif input_text2 == "LSTM":
128
- with open("lstm_model.pkl",'rb') as file:
129
- lstm_model = pickle.load(file)
130
 
131
  with open("lstm_tokeniser.pkl",'rb') as file:
132
  lstm_tokeniser = pickle.load(file)
 
79
 
80
 
81
  elif input_text2 == "RNN":
82
+ rnn_model=tf.keras.models.load_model("rnn_model.h5")
 
83
  with open("spam_tokeniser.pkl", 'rb') as model_file:
84
  rnn_tokeniser=pickle.load(model_file)
85
 
 
124
 
125
 
126
  elif input_text2 == "LSTM":
127
+ lstm_model=tf.keras.models.load_model("lstm_model.h5")
 
128
 
129
  with open("lstm_tokeniser.pkl",'rb') as file:
130
  lstm_tokeniser = pickle.load(file)