jiawenchim commited on
Commit
6a24129
1 Parent(s): 3cdcdc1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -13,11 +13,14 @@ def predict_energy(f0,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13):
13
  # if f0 is not None:
14
  # if f= == "Custom LSTM":
15
 
16
- weather_input_array = np.array([f1,f2,f3,f4,f5,f6]).reshape(1,-1)
 
 
 
 
17
 
18
  scaler = load("scaler.joblib")
19
  scaled_weather_input_array = scaler.transform(weather_input_array)
20
- history_input_array = np.array([f7,f8,f9,f10,f11,f12,f13])
21
  input_feature = np.concatenate((scaled_weather_input_array[0],history_input_array[0]))
22
 
23
  model = load_model('history_7_future_1.h5')
 
13
  # if f0 is not None:
14
  # if f= == "Custom LSTM":
15
 
16
+ weather_input_array = [f1,f2,f3,f4,f5,f6]
17
+ history_input_array =[f7,f8,f9,f10,f11,f12,f13]
18
+
19
+ weather_input_array = np.array(weather_input).reshape(1,-1)
20
+ history_input_array = np.array(history_input).reshape(1,-1)
21
 
22
  scaler = load("scaler.joblib")
23
  scaled_weather_input_array = scaler.transform(weather_input_array)
 
24
  input_feature = np.concatenate((scaled_weather_input_array[0],history_input_array[0]))
25
 
26
  model = load_model('history_7_future_1.h5')