From c74eb3b3fa8ca6c25ce26992e5f775bddeea0340 Mon Sep 17 00:00:00 2001 From: Derek Holloway Date: Tue, 10 Mar 2026 20:20:27 -0700 Subject: [PATCH] Update Interop to support float instead of Int Now --- WebServer/Controllers/PythonInterop.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebServer/Controllers/PythonInterop.cs b/WebServer/Controllers/PythonInterop.cs index 26935936..4b66f01a 100644 --- a/WebServer/Controllers/PythonInterop.cs +++ b/WebServer/Controllers/PythonInterop.cs @@ -27,12 +27,12 @@ namespace Controllers.PythonInterop { } // Return ( Error, Signal ) - public (string, int) PredictAI(string StockSymbol) { + public (string, float) PredictAI(string StockSymbol) { (bool, string) Success = PyProcess.RunPythonProcess(_PyPath, _ExecPath + "/aipredictor.py", returns: true, PyArgs: StockSymbol); if (!Success.Item1) { return (Success.Item2, 0); } else { - if (int.TryParse(Success.Item2, out int parsed)) { + if (float.TryParse(Success.Item2, out float parsed)) { return ("", parsed); } return ("Python returns an unknown value", 0);