From ca2d8cf7c65f98b04040bc74ce9dbd18af3c0886 Mon Sep 17 00:00:00 2001 From: almaz Date: Thu, 24 Oct 2024 19:58:07 +0200 Subject: [PATCH] read state from request --- src/main.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.py b/src/main.py index 43aa8f3..552de5e 100644 --- a/src/main.py +++ b/src/main.py @@ -37,12 +37,14 @@ def start_comparison(): @server.post("/run_evaluation") -async def inference_pointcloud_ids(request: Request): +async def evaluate(request: Request): req = await request.json() - run_evaluation(req["session_id"], req["project_id"]) + state = req["state"] + run_evaluation(state["session_id"], state["project_id"]) @server.post("/run_comparison") -async def inference_pointcloud_ids(request: Request): +async def compare(request: Request): req = await request.json() - run_compare(req["eval_dirs"]) + state = req["state"] + run_compare(state["eval_dirs"])