Update Interop to support float instead of Int Now

This commit is contained in:
2026-03-10 20:20:27 -07:00
parent 2474596156
commit c74eb3b3fa
+2 -2
View File
@@ -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);