mmmapms commited on
Commit
c221e61
1 Parent(s): f5228e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -23
app.py CHANGED
@@ -3,29 +3,33 @@ import pandas as pd
3
  import numpy as np
4
  import plotly.graph_objs as go
5
  from io import BytesIO
6
-
7
-
8
- @st.cache_data
9
- def load_data_predictions():
10
- df = pd.read_csv('Predictions.csv')
11
- df = df.rename(columns={
12
- 'Price': 'Real Price',
13
- 'DNN1': 'Neural Network 1',
14
- 'DNN2': 'Neural Network 2',
15
- 'DNN3': 'Neural Network 3',
16
- 'DNN4': 'Neural Network 4',
17
- 'DNN_Ensemble': 'Neural Network Ensemble',
18
- 'LEAR56': 'Regularized Linear Model 1',
19
- 'LEAR84': 'Regularized Linear Model 2',
20
- 'LEAR112': 'Regularized Linear Model 3',
21
- 'LEAR730': 'Regularized Linear Model 4',
22
- 'LEAR_Ensemble': 'Regularized Linear Model Ensemble',
23
- 'Persis': 'Persistence Model',
24
- 'Hybrid_Ensemble': 'Hybrid Ensemble'
25
- })
26
- df['Date'] = pd.to_datetime(df['Date'], dayfirst=True)
27
- df_filtered = df.dropna(subset=['Real Price'])
28
- return df, df_filtered
 
 
 
 
29
 
30
  df, df_filtered = load_data_predictions()
31
 
 
3
  import numpy as np
4
  import plotly.graph_objs as go
5
  from io import BytesIO
6
+ from datasets import load_dataset
7
+
8
+ df = load_dataset("mmmapms/Forecasts")
9
+ df['Date'] = pd.to_datetime(df['Date'], dayfirst=True)
10
+ df_filtered = df.dropna(subset=['Real Price'])
11
+
12
+ #@st.cache_data
13
+ #def load_data_predictions():
14
+ # df = pd.read_csv('Predictions.csv')
15
+ # df = df.rename(columns={
16
+ # 'Price': 'Real Price',
17
+ # 'DNN1': 'Neural Network 1',
18
+ # 'DNN2': 'Neural Network 2',
19
+ # 'DNN3': 'Neural Network 3',
20
+ # 'DNN4': 'Neural Network 4',
21
+ # 'DNN_Ensemble': 'Neural Network Ensemble',
22
+ # 'LEAR56': 'Regularized Linear Model 1',
23
+ # 'LEAR84': 'Regularized Linear Model 2',
24
+ # 'LEAR112': 'Regularized Linear Model 3',
25
+ # 'LEAR730': 'Regularized Linear Model 4',
26
+ # 'LEAR_Ensemble': 'Regularized Linear Model Ensemble',
27
+ # 'Persis': 'Persistence Model',
28
+ # 'Hybrid_Ensemble': 'Hybrid Ensemble'
29
+ #})
30
+ # df['Date'] = pd.to_datetime(df['Date'], dayfirst=True)
31
+ # df_filtered = df.dropna(subset=['Real Price'])
32
+ # return df, df_filtered
33
 
34
  df, df_filtered = load_data_predictions()
35