anandhu-pk commited on
Commit
0eb2b65
·
1 Parent(s): 0395db4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -89,8 +89,10 @@ if task=='Sentiment Classification':
89
 
90
  elif arc == arcs[2]:
91
  # DNN
92
- with open("dnn_model.pkl",'rb') as file:
93
- dnn_model = pickle.load(file)
 
 
94
  with open("dnn_tokeniser.pkl",'rb') as file:
95
  dnn_tokeniser = pickle.load(file)
96
 
@@ -112,8 +114,9 @@ if task=='Sentiment Classification':
112
 
113
  elif arc == arcs[3]:
114
  # RNN
115
- with open("rnn_model.pkl",'rb') as file:
116
- rnn_model = pickle.load(file)
 
117
 
118
  with open("rnn_tokeniser.pkl",'rb') as file:
119
  rnn_tokeniser = pickle.load(file)
@@ -136,8 +139,9 @@ if task=='Sentiment Classification':
136
 
137
  elif arc == arcs[4]:
138
  # LSTM
139
- with open("lstm_model.pkl",'rb') as file:
140
- lstm_model = pickle.load(file)
 
141
 
142
  with open("lstm_tokeniser.pkl",'rb') as file:
143
  lstm_tokeniser = pickle.load(file)
 
89
 
90
  elif arc == arcs[2]:
91
  # DNN
92
+ dnn_model = load_model("dnn_model1.h5")
93
+
94
+ #with open("dnn_model.pkl",'rb') as file:
95
+ #dnn_model = pickle.load(file)
96
  with open("dnn_tokeniser.pkl",'rb') as file:
97
  dnn_tokeniser = pickle.load(file)
98
 
 
114
 
115
  elif arc == arcs[3]:
116
  # RNN
117
+ #with open("rnn_model.pkl",'rb') as file:
118
+ #rnn_model = pickle.load(file)
119
+ rnn_model = load_model("rnn_model1.h5")
120
 
121
  with open("rnn_tokeniser.pkl",'rb') as file:
122
  rnn_tokeniser = pickle.load(file)
 
139
 
140
  elif arc == arcs[4]:
141
  # LSTM
142
+ #with open("lstm_model.pkl",'rb') as file:
143
+ #lstm_model = pickle.load(file)
144
+ lstm_model = load_model("lstm_model1.h5")
145
 
146
  with open("lstm_tokeniser.pkl",'rb') as file:
147
  lstm_tokeniser = pickle.load(file)