Kwasiasomani commited on
Commit
8934416
1 Parent(s): 4b4b385

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -137,12 +137,13 @@ if menu == 'Prediction target':
137
  train_enc = input_data.drop(['city'],axis = 1)
138
  #input_d = pd.concat([train_enc, encoded_cat], axis=1)
139
  input_d = pd.concat([train_enc, input_encoded_df], axis=1)
 
140
 
141
 
142
 
143
  # convert input_data to a numpy array before flattening to convert it back to a 2D array
144
  input_df= input_d.to_numpy()
145
- prediction = model.predict(input_df.flatten().reshape(1, -1))
146
 
147
 
148
  if st.button('Predict'):
 
137
  train_enc = input_data.drop(['city'],axis = 1)
138
  #input_d = pd.concat([train_enc, encoded_cat], axis=1)
139
  input_d = pd.concat([train_enc, input_encoded_df], axis=1)
140
+ prediction = input_d.values
141
 
142
 
143
 
144
  # convert input_data to a numpy array before flattening to convert it back to a 2D array
145
  input_df= input_d.to_numpy()
146
+ prediction = model.predict(prediction.flatten().reshape(1, -1))
147
 
148
 
149
  if st.button('Predict'):