Jitendra12421 commited on
Commit
0ff6f9c
Β·
verified Β·
1 Parent(s): 9ebacf5

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -113,6 +113,17 @@ def t5_update_trigger(background_tasks: BackgroundTasks):
113
 
114
  return {"status": "triggered", "message": "T5 update pipeline started in the background."}
115
 
 
 
 
 
 
 
 
 
 
 
 
116
  # ── NEW: NIFTY 50 Multi-Tier Forecaster Endpoints ─────────────────────────────
117
 
118
  @app.get("/nifty50")
 
113
 
114
  return {"status": "triggered", "message": "T5 update pipeline started in the background."}
115
 
116
+ @app.post("/t5/generate-now")
117
+ def force_t5_generation(background_tasks: BackgroundTasks):
118
+ """Force T5 prediction generation immediately, bypassing time checks."""
119
+ background_tasks.add_task(run_t5_pipeline)
120
+ return {
121
+ "status": "triggered",
122
+ "message": "T5 generation forced. Check /t5/predictions for results.",
123
+ "trigger_time": datetime.now(IST).isoformat(),
124
+ }
125
+
126
+
127
  # ── NEW: NIFTY 50 Multi-Tier Forecaster Endpoints ─────────────────────────────
128
 
129
  @app.get("/nifty50")