Use threading for python. and make singals from python

This commit is contained in:
derek holloway committed 2026-02-19 15:09:06 -08:00
1 parent 4f08732c78
commit 6172d1c373
3 files changed
+51 -12

No files matched your search

+3 -5
View File
@@ -30,13 +30,11 @@ namespace PythonInterop {
}
}
public double[] PredictAI() {
public int PredictAI(string StockSymbol) {
using (Py.GIL()) {
dynamic main = Py.Import("ai-predictor");
string result = main.Predict();
double[]? predictions = JsonSerializer.Deserialize<double[]>(result);
double[] nullCasted = predictions != null ? predictions : [];
return nullCasted;
int result = main.Predict(StockSymbol);
return result;
}
}