Wire all of it into C#
This commit is contained in:
@@ -22,17 +22,17 @@ namespace PythonInterop {
|
||||
}
|
||||
|
||||
// This is thread blocking, runs on the main thread, and takes multiple minutes so probabaly need to run on a background thread at some point
|
||||
public void PullData() {
|
||||
public void TrainAI() {
|
||||
using (Py.GIL()) {
|
||||
dynamic datapuller = Py.Import("datapuller");
|
||||
dynamic result = datapuller.pull();
|
||||
dynamic datapuller = Py.Import("ai-trainer");
|
||||
dynamic result = datapuller.TrainAI();
|
||||
}
|
||||
}
|
||||
|
||||
public void TestAI() {
|
||||
public void PredictAI() {
|
||||
using (Py.GIL()) {
|
||||
dynamic main = Py.Import("main");
|
||||
dynamic result = main.main();
|
||||
dynamic main = Py.Import("ai-predictor");
|
||||
dynamic result = main.Predict();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user