dlaj commited on
Commit
0d7d371
·
verified ·
1 Parent(s): 2af8fc8

Update streamlit_simulation/app.py

Browse files
Files changed (1) hide show
  1. streamlit_simulation/app.py +11 -2
streamlit_simulation/app.py CHANGED
@@ -134,7 +134,11 @@ def load_transformer_model_and_dataset():
134
 
135
  # Load model
136
  model = load_moment_model()
137
- checkpoint_path = os.path.join(CHECKPOINT_DIR, "model_final.pth")
 
 
 
 
138
  model.load_state_dict(torch.load(checkpoint_path, map_location=device))
139
  model.to(device)
140
  model.eval()
@@ -148,7 +152,12 @@ def load_transformer_model_and_dataset():
148
 
149
  @st.cache_data
150
  def load_data():
151
- df = pd.read_csv(DATA_PATH, parse_dates=["date"])
 
 
 
 
 
152
  return df
153
 
154
 
 
134
 
135
  # Load model
136
  model = load_moment_model()
137
+ checkpoint_path = hf_hub_download(
138
+ repo_id="dlaj/energy-forecasting-files",
139
+ filename="transformer_model/model_final.pth",
140
+ repo_type="dataset"
141
+ )
142
  model.load_state_dict(torch.load(checkpoint_path, map_location=device))
143
  model.to(device)
144
  model.eval()
 
152
 
153
  @st.cache_data
154
  def load_data():
155
+ csv_path = hf_hub_download(
156
+ repo_id="dlaj/energy-forecasting-files",
157
+ filename="data/processed/energy_consumption_aggregated_cleaned.csv",
158
+ repo_type="dataset"
159
+ )
160
+ df = pd.read_csv(csv_path, parse_dates=["date"])
161
  return df
162
 
163