Spaces:
Running
Running
tryout no plot
Browse files
streamlit_simulation/app.py
CHANGED
@@ -193,14 +193,14 @@ def predict_transformer_step(model, dataset, idx, device):
|
|
193 |
|
194 |
|
195 |
def init_simulation_layout():
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
|
|
200 |
return plot_title, plot_container, x_axis_label, info_container
|
201 |
|
202 |
|
203 |
-
|
204 |
def create_prediction_plot(pred_timestamps, pred_vals, true_timestamps, true_vals, window_hours, y_min=None, y_max=None):
|
205 |
"""Generates the matplotlib figure for plotting prediction vs. actual."""
|
206 |
fig, ax = plt.subplots(figsize=(8, 5), constrained_layout=True, facecolor=PLOT_COLOR)
|
|
|
193 |
|
194 |
|
195 |
def init_simulation_layout():
|
196 |
+
col1, spacer, col2 = st.columns([3, 0.2, 1])
|
197 |
+
plot_title = col1.empty()
|
198 |
+
plot_container = col1.empty()
|
199 |
+
x_axis_label = col1.empty()
|
200 |
+
info_container = col2.empty()
|
201 |
return plot_title, plot_container, x_axis_label, info_container
|
202 |
|
203 |
|
|
|
204 |
def create_prediction_plot(pred_timestamps, pred_vals, true_timestamps, true_vals, window_hours, y_min=None, y_max=None):
|
205 |
"""Generates the matplotlib figure for plotting prediction vs. actual."""
|
206 |
fig, ax = plt.subplots(figsize=(8, 5), constrained_layout=True, facecolor=PLOT_COLOR)
|