Jitendra12421 commited on
Commit
2194ae4
·
verified ·
1 Parent(s): 0ceca62

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -12
app.py CHANGED
@@ -263,12 +263,13 @@ def attach_market_state(payload: dict) -> dict:
263
  "reason": None if t5_available else state["t5_detail"],
264
  "input_date": t5_latest.get("input_date"),
265
  "prediction": t5_latest.get("prediction") if t5_available else None,
266
- "prob_up": t5_latest.get("prob_up") if t5_available else None,
267
- "confidence": t5_latest.get("confidence") if t5_available else None,
268
- "threshold": t5_latest.get("threshold") if t5_available else None,
269
- "model_name": t5_latest.get("model_name"),
270
- "validation_accuracy": (payload.get("summary") or {}).get("validation_accuracy"),
271
- "test_accuracy": (payload.get("summary") or {}).get("test_accuracy"),
 
272
  },
273
  "tplus1": {
274
  "available": tplus1_available,
@@ -277,12 +278,13 @@ def attach_market_state(payload: dict) -> dict:
277
  "target_date": tplus1_latest.get("target_date") or state["next_session_date"],
278
  "input_date": tplus1_latest.get("input_date"),
279
  "prediction": tplus1_latest.get("prediction") if tplus1_available else None,
280
- "prob_up": tplus1_latest.get("prob_up") if tplus1_available else None,
281
- "confidence": tplus1_latest.get("confidence") if tplus1_available else None,
282
- "threshold": tplus1_latest.get("threshold") if tplus1_available else None,
283
- "model_name": tplus1_latest.get("model_name"),
284
- "validation_accuracy": (payload.get("tplus1_summary") or {}).get("validation_accuracy"),
285
- "test_accuracy": (payload.get("tplus1_summary") or {}).get("test_accuracy"),
 
286
  },
287
  }
288
  return payload
 
263
  "reason": None if t5_available else state["t5_detail"],
264
  "input_date": t5_latest.get("input_date"),
265
  "prediction": t5_latest.get("prediction") if t5_available else None,
266
+ "prob_up": t5_latest.get("prob_up") if t5_available else None,
267
+ "confidence": t5_latest.get("confidence") if t5_available else None,
268
+ "threshold": t5_latest.get("threshold") if t5_available else None,
269
+ "is_overridden": bool(t5_latest.get("is_overridden")) if t5_available else False,
270
+ "model_name": t5_latest.get("model_name"),
271
+ "validation_accuracy": (payload.get("summary") or {}).get("validation_accuracy"),
272
+ "test_accuracy": (payload.get("summary") or {}).get("test_accuracy"),
273
  },
274
  "tplus1": {
275
  "available": tplus1_available,
 
278
  "target_date": tplus1_latest.get("target_date") or state["next_session_date"],
279
  "input_date": tplus1_latest.get("input_date"),
280
  "prediction": tplus1_latest.get("prediction") if tplus1_available else None,
281
+ "prob_up": tplus1_latest.get("prob_up") if tplus1_available else None,
282
+ "confidence": tplus1_latest.get("confidence") if tplus1_available else None,
283
+ "threshold": tplus1_latest.get("threshold") if tplus1_available else None,
284
+ "is_overridden": bool(tplus1_latest.get("overlay_changed")) if tplus1_available else False,
285
+ "model_name": tplus1_latest.get("model_name"),
286
+ "validation_accuracy": (payload.get("tplus1_summary") or {}).get("validation_accuracy"),
287
+ "test_accuracy": (payload.get("tplus1_summary") or {}).get("test_accuracy"),
288
  },
289
  }
290
  return payload