Spaces:
Sleeping
Sleeping
update modelforecast_chat
Browse files
main.py
CHANGED
|
@@ -638,8 +638,8 @@ async def modelforecast_chat(
|
|
| 638 |
if not user_token:
|
| 639 |
raise HTTPException(status_code=401, detail="Missing Authorization Bearer token (dt+...)")
|
| 640 |
df_records = await _fetch_url_to_records(data_url)
|
| 641 |
-
|
| 642 |
-
return await _forward("/modelforecast/", "POST", json_body=
|
| 643 |
|
| 644 |
|
| 645 |
@app.post("/modelfit-file/")
|
|
|
|
| 638 |
if not user_token:
|
| 639 |
raise HTTPException(status_code=401, detail="Missing Authorization Bearer token (dt+...)")
|
| 640 |
df_records = await _fetch_url_to_records(data_url)
|
| 641 |
+
# Backend modelforecast expects the raw JSON array as body (single Body(...) param), not {"df_forecast": [...]}
|
| 642 |
+
return await _forward("/modelforecast/", "POST", json_body=df_records, user_token=user_token)
|
| 643 |
|
| 644 |
|
| 645 |
@app.post("/modelfit-file/")
|