Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -28,7 +28,7 @@ def read_root():
|
|
| 28 |
|
| 29 |
|
| 30 |
@app.post("/api/volume_prediction")
|
| 31 |
-
async def predict_volume(vol_moving_avg: float = Form(), adj_close_rolling_med: float = Form()):
|
| 32 |
features = [vol_moving_avg, adj_close_rolling_med]
|
| 33 |
predicted_volume = model.predict([features])[0]
|
| 34 |
return {"predicted_volume": predicted_volume}
|
|
|
|
| 28 |
|
| 29 |
|
| 30 |
@app.post("/api/volume_prediction")
|
| 31 |
+
async def predict_volume(vol_moving_avg: float = Form(...), adj_close_rolling_med: float = Form(...)):
|
| 32 |
features = [vol_moving_avg, adj_close_rolling_med]
|
| 33 |
predicted_volume = model.predict([features])[0]
|
| 34 |
return {"predicted_volume": predicted_volume}
|