Spaces:
Runtime error
Runtime error
energy model changed
Browse files- src/model.py +4 -2
src/model.py
CHANGED
@@ -17,8 +17,10 @@ class Model_Load:
|
|
17 |
pass
|
18 |
def energy_model_load(self,model_option):
|
19 |
if model_option=='TFT':
|
20 |
-
best_model_path='models/consumer_final_10/lightning_logs/lightning_logs/version_0/checkpoints/epoch=5-step=49260.ckpt'
|
21 |
-
best_tft = TemporalFusionTransformer.load_from_checkpoint(best_model_path)
|
|
|
|
|
22 |
print('Model Load Sucessfully.')
|
23 |
return best_tft
|
24 |
elif model_option=='Prophet':
|
|
|
17 |
pass
|
18 |
def energy_model_load(self,model_option):
|
19 |
if model_option=='TFT':
|
20 |
+
# best_model_path='models/consumer_final_10/lightning_logs/lightning_logs/version_0/checkpoints/epoch=5-step=49260.ckpt'
|
21 |
+
# best_tft = TemporalFusionTransformer.load_from_checkpoint(best_model_path)
|
22 |
+
filename="models/cpu_energy_tft_model_v1.sav"
|
23 |
+
best_tft=pickle.load(open(filename, 'rb'))
|
24 |
print('Model Load Sucessfully.')
|
25 |
return best_tft
|
26 |
elif model_option=='Prophet':
|