Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import requests
|
|
6 |
from io import StringIO
|
7 |
import base64
|
8 |
|
9 |
-
@st.
|
10 |
def load_data_predictions(github_token):
|
11 |
|
12 |
url = 'https://api.github.com/repos/mmmapms/Forecast_DAM_V2/contents/Predictions.csv'
|
@@ -37,7 +37,6 @@ def load_data_predictions(github_token):
|
|
37 |
'Persis': 'Persistence Model',
|
38 |
'Hybrid_Ensemble': 'Hybrid Ensemble'
|
39 |
})
|
40 |
-
print(df)
|
41 |
df['Date'] = pd.to_datetime(df['Date'], dayfirst=True)
|
42 |
df_filtered = df.dropna(subset=['Real Price'])
|
43 |
return df, df_filtered
|
|
|
6 |
from io import StringIO
|
7 |
import base64
|
8 |
|
9 |
+
@st.cache(ttl=86400) # TTL is set for 86400 seconds (24 hours)
|
10 |
def load_data_predictions(github_token):
|
11 |
|
12 |
url = 'https://api.github.com/repos/mmmapms/Forecast_DAM_V2/contents/Predictions.csv'
|
|
|
37 |
'Persis': 'Persistence Model',
|
38 |
'Hybrid_Ensemble': 'Hybrid Ensemble'
|
39 |
})
|
|
|
40 |
df['Date'] = pd.to_datetime(df['Date'], dayfirst=True)
|
41 |
df_filtered = df.dropna(subset=['Real Price'])
|
42 |
return df, df_filtered
|