diff --git a/main.py b/main.py index 0a9bfd3..d5b8f39 100644 --- a/main.py +++ b/main.py @@ -19,7 +19,7 @@ def run_compute(a,b,sigma): capture_output=True, text=True ) - return result.stdout.strip() + return int(result.stdout.strip().strip('"')) @app.post("/compute") async def compute(data: ComputeInput): @@ -37,7 +37,7 @@ async def compute(data: ComputeInput): futures = [executor.submit(run_compute, a, b, sigma) for a, b in ranges] results = [f.result() for f in futures] - return results + return sum(results) if __name__ == "__main__": uvicorn.run(app, host="0.0.0.0", port=8000)