EnYa32 commited on
Commit
a9e65e7
·
verified ·
1 Parent(s): 5c2beff

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +6 -3
src/streamlit_app.py CHANGED
@@ -130,11 +130,14 @@ with col2:
130
  st.write(f"Date range: **{df.index.min().date()} → {df.index.max().date()}**")
131
  st.write("Lookback window:", f"**{LOOKBACK} months**")
132
 
133
- if show_metrics and METRICS_PATH is not None:
134
  st.subheader("Saved metrics")
135
  try:
136
- metrics = joblib.load(METRICS_PATH)
137
- st.json(metrics)
 
 
 
138
  except Exception as e:
139
  st.info(f"metrics.pkl found but could not be read. ({e})")
140
 
 
130
  st.write(f"Date range: **{df.index.min().date()} → {df.index.max().date()}**")
131
  st.write("Lookback window:", f"**{LOOKBACK} months**")
132
 
133
+ if show_metrics and METRICS_PATH is not None:
134
  st.subheader("Saved metrics")
135
  try:
136
+ m = joblib.load(METRICS_PATH)
137
+ c1, c2, c3 = st.columns(3)
138
+ c1.metric("RMSE", f"{m['rmse']:.2f}")
139
+ c2.metric("MAE", f"{m['mae']:.2f}")
140
+ c3.metric("MAPE (%)", f"{m['mape']:.2f}")
141
  except Exception as e:
142
  st.info(f"metrics.pkl found but could not be read. ({e})")
143