rscolati commited on
Commit
35f8d8f
1 Parent(s): 3841ae0

Upload 3 files

Browse files
Files changed (1) hide show
  1. app.py +15 -7
app.py CHANGED
@@ -17,20 +17,28 @@ dataset_api = project.get_dataset_api()
17
  dataset_api.download("Resources/images/df_ny_elec_recent.png", overwrite=True)
18
 
19
  with gr.Blocks() as demo:
 
20
  with gr.Row():
21
  with gr.Column():
22
- gr.Label("Today's predicted NY electricity demand")
23
- gr.Label("{:.0f}MWh".format(latest_prediction['prediction']))
24
  with gr.Column():
25
- gr.Label("Today's actual demand")
26
- gr.Label("{}MWh".format(latest_prediction['actual']))
 
 
 
 
 
 
 
 
27
  with gr.Row():
28
  with gr.Column():
29
- gr.Label("Recent Prediction History")
30
  input_img = gr.Image("df_ny_elec_recent.png", elem_id="recent-predictions")
31
  with gr.Column():
32
- gr.Label("MAE for historical predictions")
33
- gr.Label("{:.0f}MWh".format(mean_error))
34
 
35
 
36
  demo.launch()
 
17
  dataset_api.download("Resources/images/df_ny_elec_recent.png", overwrite=True)
18
 
19
  with gr.Blocks() as demo:
20
+ gr.Label("Today's prediction")
21
  with gr.Row():
22
  with gr.Column():
23
+ gr.Textbox(value="{}".format(latest_prediction['prediction_date']),
24
+ label="Prediction date")
25
  with gr.Column():
26
+ gr.Textbox(value="{:.0f}MWh".format(latest_prediction['prediction']),
27
+ label="Predicted NY electricity demand")
28
+ with gr.Row():
29
+ with gr.Column():
30
+ gr.Textbox(value="{}MWh".format(latest_prediction['actual']),
31
+ label="Actual demand")
32
+ with gr.Column():
33
+ gr.Textbox(value="{}MWh".format(latest_prediction['forecast_eia']),
34
+ label="EIA forecast")
35
+ gr.Label("Recent Prediction History")
36
  with gr.Row():
37
  with gr.Column():
 
38
  input_img = gr.Image("df_ny_elec_recent.png", elem_id="recent-predictions")
39
  with gr.Column():
40
+ gr.Textbox(label="MAE for historical predictions",
41
+ value="{:.0f}MWh".format(mean_error))
42
 
43
 
44
  demo.launch()