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
|
// 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()) {
|
using (Py.GIL()) {
|
||||||
dynamic datapuller = Py.Import("datapuller");
|
dynamic datapuller = Py.Import("ai-trainer");
|
||||||
dynamic result = datapuller.pull();
|
dynamic result = datapuller.TrainAI();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TestAI() {
|
public void PredictAI() {
|
||||||
using (Py.GIL()) {
|
using (Py.GIL()) {
|
||||||
dynamic main = Py.Import("main");
|
dynamic main = Py.Import("ai-predictor");
|
||||||
dynamic result = main.main();
|
dynamic result = main.Predict();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user